I have a host with CAT support for L2 cache. I've created two classes in /sys/fs/resctrl, c0 and c1:
$ grep . -r /sys/fs/resctrl/c*
/sys/fs/resctrl/c0/mode:shareable
/sys/fs/resctrl/c0/schemata:L2:0=03;1=03
/sys/fs/resctrl/c0/size:L2:0=262144;1=262144
/sys/fs/resctrl/c0/cpus:0
/sys/fs/resctrl/c1/mode:shareable
/sys/fs/resctrl/c1/schemata:L2:0=0c;1=0c
/sys/fs/resctrl/c1/size:L2:0=262144;1=262144
/sys/fs/resctrl/c1/cpus:0
/sys/fs/resctrl/cpus:f
/sys/fs/resctrl/cpus_list:0-3
I've now created a basic example following the description in Section Creating an OCI Bundle, created the spec with runc spec and just added
"intelRdt": {
"closID": "c0",
"l3CacheSchema": "",
"memBwSchema": ""
}
to the linux section, then started the container with sudo runc run rdttest. Within the container shell I did sleep 1m and checked for the PID outside the container with
$ ps aux | grep sleep
root 469581 0.0 0.0 1320 4 pts/0 S+ 18:53 0:00 sleep 1m
then checked the tasks files for this PID with
$ grep . -r /sys/fs/resctrl/* | grep 469581
/sys/fs/resctrl/tasks:469581
and found it within the default root group. However, I would expect it to show up in /sys/fs/resctrl/c0/tasks instead.
I did exactly the same test on another machine that supports L3 cache for CAT and it worked like expected.
I have a host with CAT support for L2 cache. I've created two classes in
/sys/fs/resctrl,c0andc1:I've now created a basic example following the description in Section Creating an OCI Bundle, created the spec with
runc specand just addedto the
linuxsection, then started the container withsudo runc run rdttest. Within the container shell I didsleep 1mand checked for the PID outside the container with$ ps aux | grep sleep root 469581 0.0 0.0 1320 4 pts/0 S+ 18:53 0:00 sleep 1mthen checked the
tasksfiles for this PID withand found it within the default root group. However, I would expect it to show up in
/sys/fs/resctrl/c0/tasksinstead.I did exactly the same test on another machine that supports L3 cache for CAT and it worked like expected.