Cc: Peter Zijlstra <a.p.zijlstra@...>, Trond Myklebust <trond.myklebust@...>, Linux Kernel Mailing List <linux-kernel@...>, Linux Memory Management List <linux-mm@...>, <linux-fsdevel@...>
On Thu, 26 Jul 2007 03:37:28 +0200
Nick Piggin <npiggin@suse.de> wrote:
Yes, you could use fsblock for the state bits and make a separate API
to map the actual pages.
One thing it gains us is finding the start of the cluster. Even if
called by kswapd, the state tree allows writepage to find the start of
the cluster and send down a big bio (provided I implement trylock to
avoid various deadlocks).
Well, it isn't coded yet, but I should be able to do it from the FS
specific ops.
I put the placeholder patches on hold because handling a corner case
where userland did O_DIRECT from a mmap'd region of the same file (Linus
pointed it out to me). Basically my patches had to work in 64k chunks
to avoid a deadlock in get_user_pages. With the state tree, I can
allow the page to be faulted in but still properly deal with it.
;) The O_DIRECT benefit is a fringe thing. I've long wanted to help
clean up that code, but the real point of the patch is to make general
usage faster and less complex. If I can't get there, the O_DIRECT
stuff doesn't matter.
I'm sure we can find some river in Cambridge, winner gets to throw
Axboe in.
-chris
-