Re: [PATCH/RFC] Simplified Readahead

From: Andrew Morton
Date: Wed Sep 29 2004 - 21:41:48 EST


Ram Pai <linuxram@xxxxxxxxxx> 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).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/