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
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 @@
//
// Wcfs integrates with virtmem layer to support virtmem to handle dirtying
// 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
// place of accessed virtual memory, copies base-layer content into there, and
// marks that page as read-write accessed.
// Mapping. For wcfs-backed bigfiles every VMA is interlinked with Mapping:
//
// 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
// corresponding page was already dirtied
, and if it was, the pinner does not
//
remmap virtual memory to wcfs/@revX/f and just leaves dirty page in it
s
// place, remembering pin information in fileh._pinned.
// corresponding page was already dirtied
in virtmem's BigFileH, and if it was,
//
the pinner does not remmap virtual memory to wcfs/@revX/f and just leave
s
//
dirty page in its
place, remembering pin information in fileh._pinned.
//
// Once dirty pages are no longer needed (either after discard/abort or
// writeout/commit), virtmem asks wcfs client to remmap corresponding regions
// of Mapping in its place again.
//
// The scheme outlined above avoids splitting Mapping upon dirtying an inner
// page.
//
//
// - we can reuse virtmem code:
//
// XXX review text
// The scheme outlined above does not need to split Mapping upon dirtying an
// inner page.
//
// if RW page is added to mapping, pinner does not need to split the mmap -
// it just needs to check before overwriting that page with @revX/data
// whether RAM page was mmaped by virtmem or not. If RW page is already
// 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
// See bigfile_ops (wendelin/bigfile/file.h) for interface related to
// base-layer overlaying from virtmem point of view. For wcfs, this interface
// is provided by small wcfs client wrapper in bigfile/file_zodb.cpp .
//
// --------
//
...
...
@@ -118,6 +109,7 @@
// that serves all connections simultaneously.
// XXX (wcfs client-level file handle - see package overview) ?
// XXX locking -> explain atMu + slaves and refer to "Locking" in wcfs.go
//
// 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