在 Gem5 X86 中使用 clwb "panic: Tried to write unmapped address" 时

问题描述

我正在运行一个链表,每个节点都使用 malloc 分配了 512 字节。然后我从这 512 字节中刷新缓存行对齐的地址(使用 clwb)来测量刷新开销。该基准测试在 Linux X86 系统中运行良好。但是在 gem5 中运行时,出现以下错误。有人可以指出我可能存在的问题

Gem5 命令:

gem5/build/X86/gem5.opt gem5/configs/example/se.py --cmd=$command --options="$options" --l1d-hwp-type=StridePrefetcher --l2 -hwp-type=BOPPrefetcher --cpu-type=DerivO3cpu --mem-type=DDR4_2400_16x4 --caches --l2cache --mem-size=10GB

$command 和 $options 采用基准值

panic: Tried to write unmapped address 0x56318e53ed40.
PC: 0x20ee,Instr:   CLWB_M : clwb   %ctrl155,DS:[rcx]
Memory Usage: 10697132 KBytes
Program aborted at tick 225239086116
--- BEGIN LIBC BACKTRACE ---
gem5/build/X86/gem5.opt(_Z15print_backtracev+0x2c)[0x563187fada8c]
gem5/build/X86/gem5.opt(_Z12abortHandleri+0x4a)[0x563187fbfb2a]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7f8ba9c998a0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f8ba8275f47]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f8ba82778b1]
gem5/build/X86/gem5.opt(+0x51809f)[0x5631875da09f]
gem5/build/X86/gem5.opt(_ZN6X86ISA9PageFault6invokeEP13threadcontextRK14RefCountingPtrI10StaticInstE+0x57d)[0x56318780562d]
gem5/build/X86/gem5.opt(_ZN13DefaultCommitI9O3cpuImplE10commitHeadERK14RefCountingPtrI13BaSEO3DynInstIS0_EEj+0x8ec)[0x563187daafac]
gem5/build/X86/gem5.opt(_ZN13DefaultCommitI9O3cpuImplE11commitInstsEv+0x529)[0x563187dabac9]
gem5/build/X86/gem5.opt(_ZN13DefaultCommitI9O3cpuImplE6commitEv+0xaf0)[0x563187dad180]
gem5/build/X86/gem5.opt(_ZN13DefaultCommitI9O3cpuImplE4tickEv+0xd8)[0x563187dade48]
gem5/build/X86/gem5.opt(_ZN9FullO3cpuI9O3cpuImplE4tickEv+0x150)[0x563187dbdef0]
gem5/build/X86/gem5.opt(_ZN10EventQueue10serviceOneEv+0xd9)[0x563187fb5c59]
gem5/build/X86/gem5.opt(_Z9doSimLoopP10EventQueue+0x87)[0x563187fd6097]
gem5/build/X86/gem5.opt(_Z8simulatem+0xcba)[0x563187fd70ea]
gem5/build/X86/gem5.opt(+0xdb6e71)[0x563187e78e71]
gem5/build/X86/gem5.opt(+0x6226ce)[0x5631876e46ce]

PS:该基准测试适用于其他刷新变体,即 clflushclflushopt

非常感谢,我想从几天内找出问题,但还没有

基准https://github.com/arunkp1986/Test

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)