Messages in this thread | | | Date | Wed, 4 Jul 2001 19:34:02 +0100 | From | "Stephen C. Tweedie" <> | Subject | Re: O_DIRECT! or O_DIRECT? |
| |
Hi,
On Wed, Jul 04, 2001 at 06:27:13PM +0000, Miquel van Smoorenburg wrote: > In article <20010704185230.F28793@redhat.com>, > Stephen C. Tweedie <sct@redhat.com> 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.
Cheers, Stephen - 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/
| |