Re: [PATCH/RFC] Simplified Readahead

Andrew Morton
2004-09-30T02:40:15Z

Ram Pai <linuxram@us.ibm.com> wrote:
>
> On Wed, 2004-09-29 at 16:13, Andreas Dilger wrote:
> > On a readahead-related note, I'm wondering how hard it would be to have
> > some tunables and/or hooks from the readahead state manchine made
> > available to the filesystem? With the 2.4 readahead code it was basically
> > impossible for the filesystem to disable the readahead, I haven't looked
> > at the 2.6 readahead enough to determine whether we need that or not.
> >
> The best way currently to shutoff readahead is to poke into the file
> descriptors' readahead structure and set ra_pages to 0.

fadvise(fd, POSIX_FADV_RANDOM).