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: Anthony Liguori
Subject: Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT)
Date: Wed, 21 May 2008 11:02:27 -0500
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

Jamie Lokier wrote:
Avi Kivity wrote:
Here's a summary of the use cases I saw so far:

- casual use, no critical data: write back cache

- backing file shared among many guests: read-only, cached

- desktop system, but don't lose my data: O_SYNC
(significant resources on the host)

- dedicated virtualization engine: O_DIRECT
(most host resources assigned to guests)

Sounds alright, but on _my_ desktop system (a laptop), I would use O_DIRECT.

There isn't enough RAM in my system to be happy duplicating data in
guests and hosts at the same time.  VMs are quite demanding on RAM.

However, if you find a way to map host cached pages into the guest
without copying - so sharing the RAM - that would be excellent.  It
can be done in principle, by remapping pages to satisfy IDE/SCSI DMA
requests.  I don't know if it would be fast enough.  Perhaps it would
work better in KVM than QEMU.

Actually, this is precisely what I'd like to do. The key is to mmap(MAP_PRIVATE) from the underling file directly into the guest's memory. Should be just as applicable to QEMU as KVM (although for KVM we need mmu-notifiers first).

Should be a pretty good win when running multiple guests with the same backing file too.

Regards,

Anthony Liguori

-- Jamie





reply via email to

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