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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
90f869ab
Commit
90f869ab
authored
Mar 20, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1fde1d07
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
3 deletions
+37
-3
wcfs/notes.txt
wcfs/notes.txt
+7
-0
wcfs/wcfs.go
wcfs/wcfs.go
+18
-3
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+12
-0
No files found.
wcfs/notes.txt
View file @
90f869ab
...
...
@@ -41,6 +41,13 @@ https://lwn.net/ml/linux-fsdevel/20190315212556.9315-1-kirr%40nexedi.com/
Invalidations to wcfs clients are delayed until block access
============================================================
XXX patial invalidations (only for those blocks that are in OS cache) could be
still handled at zδhandle (txn boundary) time. The reason we handle them lazily
is probably to avoid unneccessary notifications (i.e. if part of a file is
mmaped, but changed block is out of mmaped region - there won't be reads
covering that block and thus no pin messages with that block at all)
XXX -> describe that in text.
Initially it was planned that wcfs would send invalidation messages to its
clients right after receiving invalidation message from ZODB at transaction
boundary time. That simplifies logic but requires that for a particular file,
...
...
wcfs/wcfs.go
View file @
90f869ab
...
...
@@ -289,7 +289,7 @@ package main
// won't be served from OS file cache and instead will trigger a FUSE read
// request to wcfs.
//
// 4.5) no invalidation messages are sent to wcfs clients at this point(+).
// 4.5) no invalidation messages are sent to wcfs clients at this point(+).
XXX rethink
//
// 4.6) processing ZODB invalidations and serving file reads (see 7) are
// organized to be mutually exclusive.
...
...
@@ -471,6 +471,8 @@ type Head struct {
// XXX move zconn's current transaction to Head here?
// XXX move watchTab here?
}
// /head/watch - served by Watch.
...
...
@@ -487,6 +489,9 @@ type Watcher struct {
sk
*
FileSock
// XXX
// fileTab: BigFile ->
// at
// pinned = ... XXX
}
// /(head|<rev>)/bigfile/ - served by BigFileDir.
...
...
@@ -1615,9 +1620,19 @@ func main() {
gmntpt
=
mntpt
// we require proper pagecache control (added to Linux 2.6.36 in 2010)
supports
:=
fssrv
.
KernelSettings
()
.
SupportsNotify
kinit
:=
fssrv
.
KernelSettings
()
kfuse
:=
fmt
.
Sprintf
(
"kernel FUSE (API %d.%d)"
,
kinit
.
Major
,
kinit
.
Minor
)
supports
:=
kinit
.
SupportsNotify
if
!
(
supports
(
fuse
.
NOTIFY_STORE_CACHE
)
&&
supports
(
fuse
.
NOTIFY_RETRIEVE_CACHE
))
{
log
.
Fatalf
(
"kernel FUSE does not support pagecache control"
)
log
.
Fatalf
(
"%s does not support pagecache control"
,
kfuse
)
}
// make a bold warning if kernel does not support precise cache invalidation
// (patch sent upstream; see notes.txt -> "Notes on OS pagecache control")
if
kinit
.
Flags
&
fuse
.
CAP_PRECISE_INVAL_DATA
==
0
{
w1
:=
fmt
.
Sprintf
(
"%s does not support precise data cache invalidation"
,
kfuse
)
w2
:=
"-> performance will be AWFUL."
log
.
Error
(
w1
);
log
.
Error
(
w2
)
fmt
.
Fprintf
(
os
.
Stderr
,
"W: wcfs: %s
\n
W: wcfs: %s
\n
"
,
w1
,
w2
)
}
// add entries to /
...
...
wcfs/wcfs_test.py
View file @
90f869ab
...
...
@@ -594,10 +594,22 @@ def test_wcfs():
assert
w
.
sendReq
(
b"watch %s @%s"
%
(
h
(
zf
.
_p_oid
),
h
(
at1
)))
==
"ok"
done
.
recv
()
# XXX test watch with all at variants
# XXX both from scratch and going e.g. at1 -> at2 -> at3
# XXX going not only up, but also down at1 <- at2 <- at3
w
=
t
.
watch
(
zf
,
at1
)
# XXX <- pin @at2 @at3
#t.watch(zf, at1, {2: at1, 3: at1}) # XXX <- pin @at2 @at3
# XXX 2 (or more) opened watch for 1 file at the same time
# XXX watch for 2 files via single watch open
# XXX watch with @at > head - must wait for head to become >= at
# XXX watch with @at < δtail.tail -> rejected
# XXX watch with at="-" -> stop watching
# XXX drop file[blk] from cache, access again -> no pin message sent the second time
# XXX mmap f; change f[blk] on pin message while under pagefault - should get changed page
...
...
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