qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] sheepdog: implement direct write semantics


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] sheepdog: implement direct write semantics
Date: Wed, 09 Jan 2013 12:10:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Il 09/01/2013 11:58, Liu Yuan ha scritto:
> On 01/09/2013 06:46 PM, Liu Yuan wrote:
>> I'll collect some numbers on it.
> 
> Well, when I use hdparm -W 0 /dev/vdx to choose the writethrough cache
> in the Guest (virtio disk), it says:
> 
> address@hidden:~$ sudo hdparm -W 0 /dev/vdb
> 
> /dev/vdb:
>  setting drive write-caching to 0 (off)
>  HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
>  HDIO_DRIVE_CMD(flushcache) failed: Inappropriate ioctl for device
>  HDIO_DRIVE_CMD(setcache) failed: Inappropriate ioctl for device
>  HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
>  HDIO_DRIVE_CMD(flushcache) failed: Inappropriate ioctl for device
>  HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
> 
> Do I need extra flags to enable WCE?

"hdparm" is specific for IDE devices.  sysfs is supported by SCSI
(including IDE with libata, and virtio-scsi) and virtio-blk.

You can use this for SCSI:

echo 'write back' > /sys/block/sda/device/scsi_disk/*/cache_type

and a similar command for virtio-blk.

Paolo

> Both Guest and Host kernel is 3.7 and I start QEMU by following command:
> 
> $ qemu-system-x86_64 --enable-kvm -drive
> file=~/images/test1,if=virtio,cache=writeback -smp 2 -cpu host -m 1024
> -drive file=sheepdog:test,if=virtio,cache=writeback
> 
> Thanks,
> Yuan
> 
> 




reply via email to

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