intel / intel-cmt-cat

User space software for Intel(R) Resource Director Technology
http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html
Other
693 stars 183 forks source link

Is kernel 3.10.0 supported for cat/mba with os interface? #182

Closed oleotiger closed 3 years ago

oleotiger commented 3 years ago

As shown by the wiki and help message of pqos:

Note:
               Requires Linux and kernel versions 4.10 and newer.
               The -I option must be used for PID monitoring.
               Processes and cores cannot be monitored together.

if I wanna monitor or manage resources by processes, I need os kernel of version4.10 or newer.

The OS is CentOS Linux release 7.6.1810, kernel : 3.10.0-957.el7.x86_64.

When I run pqos -I -p llc:$pid, I get no error and the output seems correct.

Does os interface of mba/cat support kernel 3.10 now? If yes, I think the wiki should be updated.

And when should I add -I? If I reset allocation configuration through os interface, I get errors:

[root@localhost rdt]# pqos -I -R
NOTE:  Mixed use of MSR and kernel interfaces to manage
       CAT or CMT & MBM may lead to unexpected behavior.
ERROR: Error closing file!
ERROR: Task 28293 does not exist! fclose
Allocation reset successful
oleotiger commented 3 years ago

In my OS, there is resctrl:

[root@localhost rdt]# cd /sys/fs/resctrl/
[root@localhost  resctrl]# ll
total 0
drwxr-xr-x 4 root root 0 Apr 12 16:20 COS1
drwxr-xr-x 4 root root 0 Apr 12 16:20 COS2
drwxr-xr-x 4 root root 0 Apr 12 16:20 COS3
drwxr-xr-x 4 root root 0 Apr 12 16:20 COS4
drwxr-xr-x 4 root root 0 Apr 12 16:20 COS5
drwxr-xr-x 4 root root 0 Apr 12 16:20 COS6
drwxr-xr-x 4 root root 0 Apr 12 16:20 COS7
-rw-r--r-- 1 root root 0 Apr 12 16:36 cpus
-rw-r--r-- 1 root root 0 Apr 12 16:46 cpus_list
dr-xr-xr-x 4 root root 0 Apr 12 16:20 info
dr-xr-xr-x 4 root root 0 Apr 12 16:46 mon_data
dr-xr-xr-x 2 root root 0 Apr 12 16:20 mon_groups
-rw-r--r-- 1 root root 0 Apr 12 16:36 schemata
-rw-r--r-- 1 root root 0 Apr 12 16:36 tasks
kmabbasi commented 3 years ago

It usually throws that error when pids are no longer alive. In your case, most likely, PID '28293' has died between detecting pids and started monitoring.

Can you try it again and check whether pid is alive while it throws the same error?

Thanks, Khawar

oleotiger commented 3 years ago

I tried it again

pqos -I -R
NOTE:  Mixed use of MSR and kernel interfaces to manage
       CAT or CMT & MBM may lead to unexpected behavior.
Allocation reset successful

It seems work. But I don't know why it reports 'pid not exist' when I wanna reset counters with -I -R.

What's more, Does os interface of mba/cat support kernel 3.10 now? If yes, I think the wiki should be updated.

From the wiki, -I should not be supported with kernel-3.10. But there is no error report. Should I suppose that I could use cat/mba thought os interface with kernel-3.10?

kmabbasi commented 3 years ago

We validate RDT on RHEL, which gets duplicated in CentOS as it is a community release. Recently we validated RDT features on RHEL7.9 GA version (Linux version 3.10.0-1160.el7.x86_64). Therefore, we say it should work on RHEL7.9.

While the upstream Linux kernel enabling proceeds it is common for OS vendors to backport features to older kernels that they maintain. These backports do not make it into all versions of that older kernel, just those maintained by that vendor. While it seems it works on the version which you tested, this would not be true for all v3.10 kernels.

Thanks, Khawar

oleotiger commented 3 years ago

Thank you for your timely reply. I can use rdt safely on my OS .