lkml.org 
[lkml]   [2008]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] fast file mapping for loop
On Wed, Jan 09 2008, Andi Kleen wrote:
> Jens Axboe <jens.axboe@oracle.com> writes:
> >
> > So how does it work? Instead of punting IO to a thread and passing it
> > through the page cache, we instead attempt to send the IO directly to the
>
> Great -- something like this was needed for a long time.
>
> > - The file block mappings must not change while loop is using the file.
> > This means that we have to ensure exclusive access to the file and
> > this is the bit that is currently missing in the implementation. It
> > would be nice if we could just do this via open(), ideas welcome...
>
> get_write_access()/put_write_access() will block other writers.
>
> But as pointed out by others that is not enough for this.

Yeah, basically allowing O_RDONLY | O_DIRECT opens should be ok, but we
can't allow writes and we can't allow page cache to exist for this file
outside of loop.
> I suppose you could use a white list like a special flag for file systems
> (like ext2/ext3) that do not reallocate blocks.

Irk, but yeah we probably need something like that for now until Chris
proposes his API addition.

--
Jens Axboe



\
 
 \ /
  Last update: 2008-01-10 09:47    [from the cache]
©2003-2011 Jasper Spaans