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
c4eaa69f
Commit
c4eaa69f
authored
Mar 12, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5e83136a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
12 deletions
+22
-12
wcfs/wcfs.go
wcfs/wcfs.go
+19
-9
wcfs/zblk.go
wcfs/zblk.go
+3
-3
No files found.
wcfs/wcfs.go
View file @
c4eaa69f
...
...
@@ -339,23 +339,33 @@ package main
// rev(blk) ≤ rev'(blk) rev'(blk) = min(^^^)
//
//
// 7.2) for all
client@at mmapping
s of head/bigfile/file:
// 7.2) for all
registered client@at watcher
s of head/bigfile/file:
//
// - rev'(blk) ≤ at: -> do nothing
XXX if rev is not last and there is rev_next ≤ at ? -> also consult δFtail ?
// - rev'(blk) ≤ at: -> do nothing
// - rev'(blk) > at:
// - if blk ∈
mmapping
.pinned -> do nothing
// - if blk ∈
watcher
.pinned -> do nothing
// - rev = max(δFtail.by(#blk) : _ ≤ at) || min(rev ∈ δFtail : rev ≤ at) || at
// - client.remmap(file, #blk, @rev/bigfile/file)
// - mmapping.pinned += blk
// - watcher.pin(file, #blk, @rev)
// - watcher.pinned += blk
//
// where
//
// watcher.pin(file, #blk, @rev)
//
// sends pin message according to "Invalidation protocol", and is assumed
// to cause
//
// remmap(file, #blk, @rev/bigfile/file)
//
// on client.
//
// remmapping is done via "invalidation protocol" exchange with client.
// ( one could imagine adjusting mappings synchronously via running
// wcfs-trusted code via ptrace that wcfs injects into clients, but ptrace
// won't work when client thread is blocked under pagefault or syscall(^) )
//
// in order to support
remmapp
ing for each head/bigfile/file
// in order to support
watch
ing for each head/bigfile/file
//
// [] of
mmapping
{client@at↑, pinned}
// [] of
watch
{client@at↑, pinned}
//
// is maintained.
//
...
...
@@ -562,7 +572,7 @@ func (_ *zodbCacheControl) PCacheClassify(obj zodb.IPersistent) zodb.PCachePolic
// for performance reason we also keep ZBigFile in cache.
//
// ZBigFile is top-level object that is used on every block load, and
// it would be a waste to evict ZBigFile
state
from cache.
// it would be a waste to evict ZBigFile from cache.
case
*
ZBigFile
:
return
zodb
.
PCachePinObject
|
zodb
.
PCacheKeepState
}
...
...
wcfs/zblk.go
View file @
c4eaa69f
...
...
@@ -90,9 +90,6 @@ type zBlk interface {
blkBoundTo
()
map
[
*
ZBigFile
]
SetI64
}
// module of Wendelin ZODB py objects
const
zwendelin
=
"wendelin.bigfile.file_zodb"
// ---- zBlkBase ----
// zBlkBase provides common functionality to implement ZBlk* -> zfile, #blk binding.
...
...
@@ -534,6 +531,9 @@ func (bf *ZBigFile) Size(ctx context.Context) (_ int64, treePath []zodb.IPersist
// ----------------------------------------
// module of Wendelin ZODB py objects
const
zwendelin
=
"wendelin.bigfile.file_zodb"
func
init
()
{
t
:=
reflect
.
TypeOf
zodb
.
RegisterClass
(
zwendelin
+
".ZBlk0"
,
t
(
ZBlk0
{}),
t
(
zBlk0State
{}))
...
...
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