On 09.10.17 16:40, Paolo Bonzini wrote: > On 06/10/2017 23:52, Eduardo Habkost wrote: >> Commit f010bc643a (target-i386: add feature kvm_pv_unhalt) introduced the >> kvm_pv_unhalt feature but didn't enable it by default. >> >> Without kvm_pv_unhalt we see a measurable degradation in scheduling >> performance, so enabling it by default does make sense IMHO. This patch >> just flips it to default to on by default. >> >> [With kvm_pv_unhalt disabled] >> $ perf bench sched messaging -l 10000 >> Total time: 8.573 [sec] >> >> [With kvm_pv_unhalt enabled] >> $ perf bench sched messaging -l 10000 >> Total time: 4.416 [sec] > > I cannot reproduce this: > > Host CPU model: Haswell-EP (Xeon E5-2697 v3 @ 2.60 GHz) > Host physical CPUs: 56 (2 sockets 14 cores/sockets, 2 thread/core) > Host Linux kernel: 4.14 (more or less :)) > Host memory: 64 GB > Guest Linux kernel: 4.10.13 > > QEMU command line: > > /usr/libexec/qemu-kvm -cpu host,+kvm_pv_unhalt -M q35 \
-cpu host already enables kvm_pv_unhalt. It's actually the only CPU type that does :). The problem arises when you use libvirt with automatic cpu type detection, as it then generates something that doesn't do -cpu host. Alex