Commit 862c2cad authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 006a9815
...@@ -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 its // the pinner does not remmap virtual memory to wcfs/@revX/f and just leaves
// 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment