如何将cache info透传入qemu虚拟机

将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

posted on   半山随笔  阅读(79)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示