Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
27d91d47
Commit
27d91d47
authored
Oct 19, 2018
by
Kirill Smelkov
4
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X δFtail settled
parent
fee4a7e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
23 deletions
+34
-23
wcfs/wcfs.go
wcfs/wcfs.go
+34
-23
No files found.
wcfs/wcfs.go
View file @
27d91d47
...
@@ -265,7 +265,10 @@ package main
...
@@ -265,7 +265,10 @@ package main
//
//
// - try to retrieve file/head/data[blk] from OS file cache;
// - try to retrieve file/head/data[blk] from OS file cache;
// - if retrieved successfully -> store retrieved data into OS file cache
// - if retrieved successfully -> store retrieved data into OS file cache
// for file/@<rev>/data[blk]; XXX @rev = what? (ideally exact previous rev of blk)
// for file/@<rev>/data[blk].
//
// rev = max(δFtail.by(#blk)) || zconn.at
//
// - invalidate file/head/data[blk] in OS file cache.
// - invalidate file/head/data[blk] in OS file cache.
//
//
// This preserves previous data in OS file cache in case it will be needed
// This preserves previous data in OS file cache in case it will be needed
...
@@ -273,39 +276,49 @@ package main
...
@@ -273,39 +276,49 @@ package main
// won't be served from OS file cache and instead will trigger a FUSE read
// won't be served from OS file cache and instead will trigger a FUSE read
// request to wcfs.
// request to wcfs.
//
//
// - for file δFtail invalidation info is maintained:
// - for every file δFtail invalidation info about head/data is maintained:
//
// - tail of [](rev↑, []#blk)
// - {} #blk -> []rev↑ in tail XXX needed?
//
// δFtail describes changes to file we learned from ZODB invalidation.
// XXX and allows to quick #blk -> ... ?
//
//
// - XXX δZtail of invalidation info is maintained.
// - tail: of [](rev↑, []#blk)
// - by: {} #blk -> []rev↑ in tail
//
//
//
- tail of [](tid↑, []oid)
//
δFtail.tail describes invalidations to file we learned from ZODB invalidation.
//
- {} oid -> []tid↑ in tail
//
δFtail.by allows to quickly lookup information by #blk.
//
//
//
min(tid) in δZtail is min(@at) at which */
head/data is currently mmapped.
//
min(rev) in δFtail is min(@at) at which
head/data is currently mmapped.
//
//
// - when we receive a FUSE read(#blk) request to a file/head/data we process it as follows:
// - when we receive a FUSE read(#blk) request to a file/head/data we process it as follows:
//
//
// 1. load blkdata for head/data[blk] @zconn.at .
// 1. load blkdata for head/data[blk] @zconn.at .
// this also gives upper bound estimate of when the block was last changed:
//
//
// rev(blk) ≤ max(_.serial for _ in (ZBlk(#blk), all BTree/Bucket that lead to ZBlk))
// while loading this also gives upper bound estimate of when the block
// was last changed:
//
//
// XXX it is not exact because BTree/Bucket can change (e.g. rebalance)
// rev(blk) ≤ max(_.serial for _ in (ZBlk(#blk), all BTree/Bucket that lead to ZBlk))
//
// it is not exact because BTree/Bucket can change (e.g. rebalance)
// but still point to the same k->ZBlk.
// but still point to the same k->ZBlk.
// XXX if we maintain δBTree tail we can maybe get rev(blk) as exact?
//
// we also use file.δFtail to find either exact blk revision:
//
// rev(blk) = max(file.δFtail.by(#blk) -> []rev↑)
//
// or another upper bound if #blk ∉ δFtail:
//
// rev(blk) ≤ min(rev) is δFtail ; #blk ∉ δFtail
//
//
// below rev'(blk) is min(of the numbers found):
//
// rev(blk) ≤ rev'(blk) rev'(blk) = min(^^^)
//
//
//
// 2. for all client/addr@at mmappings of file/head/data:
// 2. for all client/addr@at mmappings of file/head/data:
//
//
// - rev(blk) ≤ at: -> do nothing
// - rev
'
(blk) ≤ at: -> do nothing
// - rev(blk) > at:
// - rev
'
(blk) > at:
// - if blk
∉
mmapping.pinned -> do nothing
// - if blk
∈
mmapping.pinned -> do nothing
// -
client.remmap(addr[blk], file/@at/data) XXX @at -> @revprev(blk) better?
// -
rev = max(δFtail.by(#blk) : _ ≤ at) || at
//
XXX @at -> @prevrev(file) even more better?
//
- client.remmap(addr[blk], file/@rev/data)
// - mmapping.pinned += blk
// - mmapping.pinned += blk
//
//
// remmapping is done synchronously via ptrace.
// remmapping is done synchronously via ptrace.
...
@@ -317,8 +330,6 @@ package main
...
@@ -317,8 +330,6 @@ package main
//
//
// is maintained.
// is maintained.
//
//
// XXX δZ is consulted to find out which client needs such update?
//
// 3. blkdata is returned to kernel.
// 3. blkdata is returned to kernel.
//
//
// Thus a client that wants latest data on pagefault will get latest data,
// Thus a client that wants latest data on pagefault will get latest data,
...
...
Kirill Smelkov
@kirr
mentioned in commit
e16e029a
·
Oct 27, 2021
mentioned in commit
e16e029a
mentioned in commit e16e029a7de3fde8b4a5cd4fe432e106617d3e02
Toggle commit list
Kirill Smelkov
@kirr
mentioned in commit
4430de41
·
Oct 28, 2021
mentioned in commit
4430de41
mentioned in commit 4430de41bfb5702980935c46ea8fee2774aaea40
Toggle commit list
Kirill Smelkov
@kirr
mentioned in commit
6f0cdaff
·
Oct 28, 2021
mentioned in commit
6f0cdaff
mentioned in commit 6f0cdaff23d4f8c3384b74b02d669c7fcfc2d821
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment