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.