将cache信息透传如虚拟机有助于guest kernel更好的进行负载均衡,甚至于减少IPI中断【1】。
使用qemu命令行:
qemu-system-x86_64 \ -cpu host,host-cache-info=on,topoext \
使用libvirt,virt-install
virt-install \ --cpu mode='host-passthrough',cache.mode='passthrough',require='topoext'
或者修改xml
<cpu mode='host-passthrough' check='none' migratable='on'> <topology sockets='1' dies='1' cores='16' threads='2'/> <cache mode='passthrough'/> <feature policy='require' name='topoext'/> </cpu>
【1】Why you should tell Qemu about your L3 cache (codeblueprint.co.uk)
【2】topology_amd.c - arch/x86/kernel/cpu/topology_amd.c - Linux source code (v6.9-rc7) - Bootlin
标签:info,虚拟机,cache,host,qemu,cpu From: https://www.cnblogs.com/banshanjushi/p/18184171