|
|
About
TODO
Blog
RSS
Old blog
Projects
Gallery
Notes
Tue, 22 Apr 2008
Cache coherency in POHMELFS. Continue.
While moving home I thought a lot about cache coherency issues.
While we belive that NFS has coherent cache, since it is somewhat
write-through, its cache actually is not synchronous, since between
object creation and moment when other clients see new object really lot
of time can run, for example when client, which create an object, has
slow link... So, object creation and removal should not be synced to other
clients during writeback on one of them, instead clients which are interested
in object perform a lookup, which may or may not return object, this is not a
race or cache non-coherency, this is usual multithreaded environment without
client's synchronization.
What we really care about, is data consistency on the server. When we have
multipage write, which overlaps with another write from different client,
we should not read data back from the middle of the transactions. Locking the
whole file is not an issue, instead proper byte-range (page-range actually)
locking has to be implemented. I already have a
prototype,
but have to check it in real life.
So, other competing projects may or may not follow my way and drop
creation/removal/stat coherency from the TODO list (afacs, no one implemented
that yet :) based on my analysis and concentrate on server read/write locking.
And I will start some bits of VM hacking: plan is to implement generic enough
(well, working on x86 for start :)
mechanism to copy data from different (i.e. not that one which
started a syscall) thread to userspace, while original one sleeps in syscall,
via copy_to_user(). Likely it will be somewhat similar to what
I did for zero-copy userspace sniffer
and how get_user_pages() work.
Result, which has to be as fast as usual copy_to_user(), otherwise it is not
interesting solution, will be used in POHMELFS client and its async reading.
/devel/fs :: Link / Comments (6)
Please solve this captcha to be allowed to post (need to reload in a minute): 34 - 9
|
Alexander Boström wrote at 2008-04-26 20:52: