[libvirt] PATCH: Disable QEMU drive caching

Daniel P. Berrange berrange at redhat.com
Wed Oct 8 17:05:39 UTC 2008


On Wed, Oct 08, 2008 at 11:49:19AM -0500, Anthony Liguori wrote:
> Daniel P. Berrange wrote:
> >On Wed, Oct 08, 2008 at 11:06:27AM -0500, Anthony Liguori wrote:
> >  
> >Sorry, it was mistakenly private - fixed now. 
> >
> >Xen does use O_DIRECT for paravirt driver case  - blktap is using the combo
> >of AIO+O_DIRECT.
> 
> You have to use O_DIRECT with linux-aio.  And blktap is well known to 
> have terrible performance.  Most serious users use blkback/blkfront and 
> blkback does not avoid the host page cache.  It maintains data integrity 
> by passing through barriers from the guest to the host.  You can 
> approximate this in userspace by using fdatasync.
> 
> The issue the bug addresses, iozone performs better than native, can be 
> addressed in the following way:
> 
> 1) For IDE, you have to disable write-caching in the guest.  This should 
> force an fdatasync in the host.
> 2) For virtio-blk, we need to implement barrier support.  This is what 
> blkfront/blkback do.
> 3) For SCSI, we should support ordered queuing which would result in an 
> fdatasync when barriers are injected.

Ok, ignore my libvirt patch then. We'll punt this problem back to QEMU
& virtio develoers to solve properly

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list