Matthew Wilcox <[email protected]> wrote: > > Note that I'm only doing async DIO reads and writes, so I was a bit > > surprised > > that XFS is doing a writeback at all - but I guess that IOCB_DIRECT is > > actually just a hint and the filesystem can turn it into buffered I/O if it > > wants. > > That's almost the exact opposite of what is going on. XFS sees that > you're going to do an O_DIRECT read, so it writes back the dirty memory > that's currently in the page cache so that your read doesn't read stale > data from disk.
In this trace, yes, that's true - but where did the dirty memory in the pagecache come from? I'm only doing DIO reads and DIO writes - oh, and as it turns out, fallocate(FALLOC_FL_ZERO_RANGE) - which, I think, may be the source of the dirty data. David -- Linux-cachefs mailing list [email protected] https://www.redhat.com/mailman/listinfo/linux-cachefs
