Damn, I have redone test with a 3.6 guest kernel, and now it's work fine. So writeback in guest is the default if nocache= is defined. Don't know if on the host side, cache is enable (none or writeback)
But if I understand the default cache on qemu 1.1 was writethrough in guest. (so directsync or writethrough on host). And not none, as it's in pve-manager currently. I'll do same test with qemu 1.1 to be sure. qemu 1.2 ide --- no cache defined : hdparm -W /dev/sda : on cache=none : hdparm -W /dev/sda : on cache=writeback : hdparm -W /dev/sda : on cache=writethrough : hdparm -W /dev/sda : off cache=directsync : hdparm -W /dev/sda : off virtio-scsi --------------------- no cache defined : sdparm --get WCE /dev/sda : on cache=none : sdparm --get WCE /dev/sda : on cache=writeback : sdparm --get WCE /dev/sda : on cache=writethrough : sdparm --get WCE /dev/sda : off cache=directsync : sdparm --get WCE /dev/sda : off lsi-scsi --------------------- no cache defined : sdparm --get WCE /dev/sda : on cache=none : sdparm --get WCE /dev/sda : on cache=writeback : sdparm --get WCE /dev/sda : on cache=writethrough : sdparm --get WCE /dev/sda : off cache=directsync : sdparm --get WCE /dev/sda : off virtio (guest kernel 3.6-rc4) ------------------------------ no cache defined : cat /sys/block/vda/cache_type : write_back cache=none : cat /sys/block/vda/cache_type : : write_back cache=writeback : cat /sys/block/vda/cache_type : write_back cache=writethrough : cat /sys/block/vda/cache_type : write_through cache=directsync : cat /sys/block/vda/cache_type : write_through ----- Mail original ----- De: "Alexandre DERUMIER" <aderum...@odiso.com> À: pve-devel@pve.proxmox.com Envoyé: Jeudi 6 Septembre 2012 13:38:58 Objet: Re: [pve-devel] qemu 1.2 :default cache mode writeback firsts test (rc2) qcow2 + ide ----------- no cache defined : hdparm -W /dev/sda : off cache=none : hdparm -W /dev/sda : on cache=directsync : hdparm -W /dev/sda : off cache=writethrough : hdparm -W /dev/sda : off cache=writeback : hdparm -W /dev/sda : on so the default mode seem to be writethrough or directsync ..??. I'll do more tests with scsi disk, and also with kvm 1.1 ----- Mail original ----- De: "Alexandre DERUMIER" <aderum...@odiso.com> À: pve-devel@pve.proxmox.com Envoyé: Jeudi 6 Septembre 2012 12:18:09 Objet: Re: [pve-devel] qemu 1.2 :default cache mode writeback I have found the commit, I'm not sure it's related to the host cache, but maybe more the cache inside the guest ? "Now all major device models (IDE, SCSI, virtio) can choose between writethrough and writeback at run-time, and virtio will even revert to writethrough if the guest is not capable of sending flushes. So we can change the default to writeback at last. Tested, for lack of a better idea, with a breakpoint on bdrv_open and all cache choices one by one. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- blockdev.c | 1 + 1 file modificato, 1 inserzione(+) diff --git a/blockdev.c b/blockdev.c index 8669142..7c83baa 100644 --- a/blockdev.c +++ b/blockdev.c @@ -377,6 +377,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) } } + bdrv_flags |= BDRV_O_CACHE_WB; if ((buf = qemu_opt_get(opts, "cache")) != NULL) { if (bdrv_parse_cache_flags(buf, &bdrv_flags) != 0) { error_report("invalid cache option"); -- 1.7.11.2 " ----- Mail original ----- De: "Alexandre DERUMIER" <aderum...@odiso.com> À: pve-devel@pve.proxmox.com Envoyé: Jeudi 6 Septembre 2012 12:13:48 Objet: [pve-devel] qemu 1.2 :default cache mode writeback I just see that in the release note: block: default cache mode is now writeback Maybe do we need to warn proxmox users and update pve-manager ? (default was cache=none if not defined) _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel