> Yes, it was implemented for the purpose of allowing an application to > implement its own caching - probably for the sole purpose of doing it > "better" or more efficient. But it simply does not work out that well, at > least with COW fs. The original idea "performance" is more or less eaten > away in a COW scenario - or worse. And that in turn is why Linus said > O_DIRECT is broken and should go away, use cache hinting instead. Linus is saying to use things like madvise but the fact is that in reality people are using O_DIRECT instead of it, so it is important to get it right. The case which I am interested is KVM. Virtual machine disk file is opened with O_DIRECT so that when Virtual machine is doing IO, it is not cached twice - first time on guest operating system level, and second time on hypervisor host operating system level. With O_DIRECT it is only cached in guest. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
