[lkml]   [2004]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH/RFC] Simplified Readahead
    Steven Pratt <> wrote:
    > >It's an application-specified readahead hint. It should ideally be
    > >asynchronous so the application can get some I/O underway while it's
    > >crunching on something else. If the queue is contested then the
    > >application will accidentally block when launching the readahead, which
    > >kinda defeats the purpose.
    > >
    > >
    > Well if the app really does this asynchronously, does it matter that we
    > block?

    ?? Not sure what you mean.

    posix_fadvise(POSIX_FADV_WILLNEED) is used by applications to tell the
    kernel that the application will need that part of the file in the future.
    Presumably, the application has something else to be going on with
    meanwhile. Hence the application doesn't want to block.

    > >Yes, the application will block when it does the subsequent read() anyway,
    > >but applications expect to block in read(). Seems saner this way.
    > >
    > Just to be sure I have this correct, the readahead code will be invoked
    > once on the POSIX_FADV_WILLNEED request, but this looks mostly like a
    > regular read, and then again for the same pages on a real read?

    yup. POSIX_FADV_WILLNEED should just populate pagecache and should launch
    asynchronous I/O.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:06    [W:0.020 / U:0.032 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site