dean gaudet wrote:
it seems to me that if splice and fadvise and related things are sufficient for userland to take care of things "properly" then O_DIRECT could be changed into splice/fadvise calls either by a library or in the kernel directly...

No, because the semantics are entirely different. An application using read/write with O_DIRECT expects read() to block until data is physically fetched from the device. fadvise() does not FORCE the kernel to discard cache, it only hints that it should, so a read() or mmap() very well may reuse a cached page instead of fetching from the disk again. The application also expects write() to block until the data is on the disk. In the case of a blocking write, you could splice/msync, but what about aio?


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to