Re: Unexpected splice "always copy" behavior observed

From: Linus Torvalds
Date: Thu May 20 2010 - 10:22:18 EST

On Wed, 19 May 2010, Mathieu Desnoyers wrote:
> Programs can use posix_fadvise() to announce an intention to access
> file data in a specific pattern in the future, thus allowing the kernel
> to perform appropriate optimizations.

It's true for some of them. The random-vs-linear behavior is a flag for
the future, for example (relevant for prefetching).

In fact, it's technically true even for DONTNEED. It's true that we won't
need the pages in the future! So we throw the pages away. But that means
that we throw the _current_ pages away.

If we actually touch pages later, than that obviously invalidates the fact
that we said 'DONTNEED' - we clearly needed them.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at