[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] The WCE issue in guest when i enable WCE in Qemu side.
From: |
Zhong, Yang |
Subject: |
[Qemu-devel] The WCE issue in guest when i enable WCE in Qemu side. |
Date: |
Tue, 23 Jul 2019 12:17:02 +0000 |
Hello all,
I am using the Qemu/SPDK to do vhost-user-blk verification, and the qemu
command as below:
./qemu-system-x86_64 \
-machine q35,accel=kvm \
-cpu host -m 1024,maxmem=20G,slots=2 -smp 6 \
-kernel ./../linux-stable/arch/x86/boot/bzImage \
-append 'root=/dev/vdb3 rw rootfstype=ext4 data=ordered
rcupdate.rcu_expedited=1 pci=lastbus=0 tsc=reliable no_timer_check reboot=t
noapictimer console=hvc0' \
-no-user-config -nodefaults \
-drive file=/home/chen/project/clear-18080-kvm.img,if=virtio,format=raw
-nographic -monitor pty \
-device virtio-serial-pci,id=virtio-serial0,disable-modern \
-chardev stdio,id=charconsole0 \
-device virtconsole,chardev=charconsole0,id=console \
-chardev socket,id=char0,path=/var/tmp/vhost.1 \
-device
vhost-user-blk-pci,chardev=char0,num-queues=1,bootindex=2,config-wce=true \
-object
memory-backend-file,id=mem1,size=1G,mem-path=/dev/hugepages,share=on \
-numa node,memdev=mem1
When I set config-wce=true or false, the below value never change
root@unicorn ~ # cat /sys/block/vda/cache_type
write back
root@unicorn ~ # cat /sys/block/vda/device/features
0010 0010 0110 0110 0000 0000 0000 1000 1000 0000 0000 0000 0000 0000 0000 0000
>From left to right, bit 11=0, which show there is no WCE feature in
>vhost-user-blk device.
I also did one simple patch to add config_wce value into s->blkcfg.wce, but the
result is same.
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index 9cb61336a6..0e3f490c82 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -447,6 +447,9 @@ reconnect:
s->blkcfg.num_queues = s->num_queues;
}
+ if (s->blkcfg.wce != s->config_wce) {
+ s->blkcfg.wce = s->config_wce;
+ }
return;
It seems the config-wce property setting in Qemu is not working, and I am not
sure if this is a bug or vhost-user-blk only support write back mode ?
Thanks a lot!
Regards,
Yang
- [Qemu-devel] The WCE issue in guest when i enable WCE in Qemu side.,
Zhong, Yang <=