On Wed, May 21, 2008 at 07:48:24PM +0300, Avi Kivity wrote:
Hmm, if remap_file_pages() supports MAP_PRIVATE, that solves all the
problems neatly.
Andrea, do you know if that combination works?
No, it only supports MAP_SHARED. Why would anyone want MAP_PRIVATE for
real I/O operations? MAP_PRIVATE is primarily for binaries and things
that are readonly on disk and that we may want to update (like for
dynamic linking w/o hardlinking).
Or is that for -snapshot support, to keep the modifications in
anonymous ram?
I imagine you want remap_file_pages for zerocopy I/O without using
O_DIRECT. If you use O_DIRECT you don't need mmap. However O_DIRECT
work best with kernel asyncio for small seeking blocks so all I/O can
be submitted at the same time. writev also works better than write for
O_DIRECT.