Skip to content

how to use

ZQ edited this page Sep 25, 2018 · 2 revisions

Check your CPU architecture

cat /proc/cpuinfo

Currently, we only support associative cache without partition. We tested in Intel Xeon X5550 which uses Nehalem architecture. Your CPU may not be supported if it uses a newer model than Nehalem.

Check your Cache spec

  • getconf -a |grep CACHE or Check the details under directory /sys/devices/system/cpu/cpu${i}/cache/index${j}

  • If your way of associativity is small, I recommand you disable cacheability management;

Check your cachebar status

cat /proc/sclock_control

VM Problems

If you use the QEMU to try CacheBar, cacheability management component will not work properly due to the incorrect physical page in VM.

Change cachebar status

  • Enable/Disable COA echo action=requestcoa /proc/sclock_control echo action=releasecoa /proc/sclock_control

  • Enable Cacheability management echo action=requestlru /proc/sclock_control echo action=releaselru /proc/sclock_control

  • set PID namespace to protect echo level=1 > /proc/sclock_control Only protect the procedure at PID namespace level >= 1 For example, the process runing inside container is at level 1 while the process runing in bare machine is at level 0. If you run container inside VM, the level may be higher.

  • set COA merge time echo sleep=10 > /proc/sclock_control

  • set COA access time echo sleep=10 > /proc/sclock_control

  • set sampleing model for budget echo prob_map[ 0 0 0 1 1 2 2 2 2 2 1 1 1 1 1 1 1] > /proc/sclock_control

  • There are other paraeters you can tuning. Please refer to the function sclock_control_write in mm/myservice.c for more details.