Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel RDT does not work with L2 cache #3550

Closed
wpross opened this issue Aug 4, 2022 · 3 comments
Closed

Intel RDT does not work with L2 cache #3550

wpross opened this issue Aug 4, 2022 · 3 comments

Comments

@wpross
Copy link

wpross commented Aug 4, 2022

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.

@wpross
Copy link
Author

wpross commented Aug 8, 2022

I've run the test with the latest release 1.1. 3 in my above test. When I've started debugging the issue and thus compiled from source, it suddenly worked. I guess that one of the following commits solved the issue:

| * | 2022-07-28 ea0bd782 libct/intelrdt: check if available iff configured (Cory Snider)
| * | 2022-07-28 56daf36b libct/intelrdt: skip remove unless configured (Cory Snider)    
| * | 2022-07-28 c156bde7 libct/intelrdt: elide parsing mountinfo (Cory Snider)          
| * | 2022-07-28 9f107489 libct/intelrdt: skip reading /proc/cpuinfo (Cory Snider)       
| * | 2022-07-28 13674f43 libct/intelrdt: delete IsMBAScEnabled() (Cory Snider)          

Thanks @corhere !

@wpross wpross closed this as completed Aug 8, 2022
@kolyshkin
Copy link
Contributor

So, this is still not working in release-1.1 branch. I figured out why and fixed it.

@kolyshkin
Copy link
Contributor

Fixed by #3978 in runc 1.1.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants