lkml.org 
[lkml]   [2007]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 7/7] readahead: basic support of interleaved reads
    From
    Date
    On Sat, 2007-07-21 at 12:43 +0800, Fengguang Wu wrote:
    > plain text document attachment (readahead-interleaved-reads.patch)
    > This is a simplified version of the pagecache context based readahead.
    > It handles the case of multiple threads reading on the same fd and invalidating
    > each others' readahead state. It does the trick by scanning the pagecache and
    > recovering the current read stream's readahead status.
    >
    > The algorithm works in a opportunistic way, in that it do not try to detect
    > interleaved reads _actively_, which requires a probe into the page cache(which
    > means a little more overheads for random reads). It only tries to handle a
    > previously started sequential readahead whose state was overwritten by
    > another concurrent stream, and it can do this job pretty well.

    Hi Fengguang,

    This is really clever!

    Only one slight complaint: I wonder if "radix_tree_scan_hole" could be
    expressed as "radix_tree_extent_size" which return the number of
    populated indices up to "max_scan". Returning a length seems more
    intuitive to me (and I think gets rid of the wraparound error case?)

    Cheers,
    Rusty.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-07-21 09:29    [W:0.022 / U:62.944 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site