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
862c2cad
Commit
862c2cad
authored
Feb 21, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
006a9815
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
26 deletions
+18
-26
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+18
-26
No files found.
wcfs/client/wcfs.cpp
View file @
862c2cad
...
@@ -75,40 +75,31 @@
...
@@ -75,40 +75,31 @@
//
//
// Wcfs integrates with virtmem layer to support virtmem to handle dirtying
// Wcfs integrates with virtmem layer to support virtmem to handle dirtying
// pages of read-only base-layer that wcfs client provides via isolated
// pages of read-only base-layer that wcfs client provides via isolated
// Mapping. When a page is write-accessed, virtmem mmaps in a page of RAM in
// Mapping. For wcfs-backed bigfiles every VMA is interlinked with Mapping:
// place of accessed virtual memory, copies base-layer content into there, and
//
// marks that page as read-write accessed.
// VMA -> BigFileH -> ZBigFile --.
// ↑↓ ZODB
// Mapping -> FileH -> wcfs server --'
//
// When a page is write-accessed, virtmem mmaps in a page of RAM in place of
// accessed virtual memory, copies base-layer content provided by Mapping into
// there, and marks that page as read-write accessed.
//
//
// Upon receiving pin message, the pinner consults virtmem, whether
// Upon receiving pin message, the pinner consults virtmem, whether
// corresponding page was already dirtied
, and if it was, the pinner does not
// corresponding page was already dirtied
in virtmem's BigFileH, and if it was,
//
remmap virtual memory to wcfs/@revX/f and just leaves dirty page in it
s
//
the pinner does not remmap virtual memory to wcfs/@revX/f and just leave
s
// place, remembering pin information in fileh._pinned.
//
dirty page in its
place, remembering pin information in fileh._pinned.
//
//
// Once dirty pages are no longer needed (either after discard/abort or
// Once dirty pages are no longer needed (either after discard/abort or
// writeout/commit), virtmem asks wcfs client to remmap corresponding regions
// writeout/commit), virtmem asks wcfs client to remmap corresponding regions
// of Mapping in its place again.
// of Mapping in its place again.
//
//
// The scheme outlined above avoids splitting Mapping upon dirtying an inner
// The scheme outlined above does not need to split Mapping upon dirtying an
// page.
// inner page.
//
//
// - we can reuse virtmem code:
//
// XXX review text
//
//
// if RW page is added to mapping, pinner does not need to split the mmap -
// See bigfile_ops (wendelin/bigfile/file.h) for interface related to
// it just needs to check before overwriting that page with @revX/data
// base-layer overlaying from virtmem point of view. For wcfs, this interface
// whether RAM page was mmaped by virtmem or not. If RW page is already
// is provided by small wcfs client wrapper in bigfile/file_zodb.cpp .
// there, pinner does not overwrite it.
//
// RW -> Uptodate: Virtmem calls pinner to remmap the page RO after commit or
// abort.
// - Mapping.remmap_blk (call from virtmem after RW -> RO)
//
//
// VMA -> fileh -> file
// ↑↓ ↑↓ (XXX here ?)
// Mapping FileH
//
//
// --------
// --------
//
//
...
@@ -118,6 +109,7 @@
...
@@ -118,6 +109,7 @@
// that serves all connections simultaneously.
// that serves all connections simultaneously.
// XXX (wcfs client-level file handle - see package overview) ?
// XXX (wcfs client-level file handle - see package overview) ?
// XXX locking -> explain atMu + slaves and refer to "Locking" in wcfs.go
// XXX locking -> explain atMu + slaves and refer to "Locking" in wcfs.go
//
//
// Conn.atMu > Conn.mu > FileH.mu
// Conn.atMu > Conn.mu > FileH.mu
...
...
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