qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_D


From: Avi Kivity
Subject: Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT)
Date: Wed, 21 May 2008 20:18:01 +0300
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

Andrea Arcangeli wrote:
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.

Yes, that's the reason. Here zerocopy is not the motivation; instead, we have host-cached pages that are used directly in the guest. So we get both reduced memory footprint, and host caching. O_DIRECT reduces the memory footprint but kills host caching.

The scenario is desktop/laptop use. For server use O_DIRECT is clearly preferred due to much reduced overhead.

--
error compiling committee.c: too many arguments to function





reply via email to

[Prev in Thread] Current Thread [Next in Thread]