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

.

parent 006a9815
......@@ -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 its
// 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 leaves
// 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
......
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