Re: O_DIRECT question

From: Phillip Susi
Date: Fri Jan 12 2007 - 10:21:33 EST


Hua Zhong wrote:
The other problem besides the inability to handle IO errors is that
mmap()+msync() is synchronous. You need to go async to keep the pipelines full.

msync(addr, len, MS_ASYNC); doesn't do what you want?


No, because there is no notification of completion. In fact, does this call actually even avoid blocking in the current code, while asking the kernel to flush the pages in the background?

Even if it performs the sync in the background, what about faulting in the pages to be synced? For instance, if you splice pages from a source mmaped file into the destination mmap, then msync on the destination, doesn't the process still block to fault in the source pages?


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