From: Stephen C. Tweedie (
Date: Wed Jul 04 2001 - 13:34:02 EST


On Wed, Jul 04, 2001 at 06:27:13PM +0000, Miquel van Smoorenburg wrote:
> In article <>,
> Stephen C. Tweedie <> wrote:
> >For these reasons, buffered IO is often faster than O_DIRECT for pure
> >sequential access. The downside it its greater CPU cost and the fact
> >that it pollutes the cache (which, in turn, causes even _more_ CPU
> >overhead when the VM is forced to start reclaiming old cache data to
> >make room for new blocks.)
> Any chance of something like O_SEQUENTIAL (like madvise(MADV_SEQUENTIAL))

What for? The kernel already optimises readahead and writebehind for
sequential files.

If you want to provide specific extra hints to the kernel, then things
like O_UNCACHE might be more appropriate to instruct the kernel to
explicitly remove the cached page after IO completes (to avoid the VM
overhead of maintaining useless cache). That would provide a definite
improvement over normal IO for large multimedia-style files or for
huge copies. But what part of the normal handling of sequential files
would O_SEQUENTIAL change? Good handling of sequential files should
be the default, not an explicitly-requested feature.

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

This archive was generated by hypermail 2b29 : Sat Jul 07 2001 - 21:00:14 EST