aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/resctrl/resctrl.h
AgeCommit message (Collapse)AuthorFilesLines
2020-02-10selftests/resctrl: Add vendor detection mechanismBabu Moger1-0/+1
RESCTRL feature is supported both on Intel and AMD now. Some features are implemented differently. Add vendor detection mechanism. Use the vendor check where there are differences. Signed-off-by: Babu Moger <[email protected]> Co-developed-by: Fenghua Yu <[email protected]> Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2020-02-10selftests/resctrl: Add Cache Allocation Technology (CAT) selftestFenghua Yu1-0/+3
Cache Allocation Technology (CAT) selftest allocates a portion of last level cache and starts a benchmark to read each cache line in this portion of cache. Measure the cache misses in perf and the misses should be equal to the number of cache lines in this portion of cache. We don't use CQM to calculate cache usage because some CAT enabled platforms don't have CQM. Co-developed-by: Sai Praneeth Prakhya <[email protected]> Signed-off-by: Sai Praneeth Prakhya <[email protected]> Co-developed-by: Babu Moger <[email protected]> Signed-off-by: Babu Moger <[email protected]> Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2020-02-10selftests/resctrl: Add Cache QoS Monitoring (CQM) selftestFenghua Yu1-0/+16
Cache QoS Monitoring (CQM) selftest starts stressful cache benchmark with specified size of memory to access the cache. Last Level cache occupancy reported by CQM should be close to the size of the memory. Co-developed-by: Sai Praneeth Prakhya <[email protected]> Signed-off-by: Sai Praneeth Prakhya <[email protected]> Co-developed-by: Babu Moger <[email protected]> Signed-off-by: Babu Moger <[email protected]> Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2020-02-10selftests/resctrl: Add MBA testFenghua Yu1-0/+2
MBA (Memory Bandwidth Allocation) test starts a stressful memory bandwidth benchmark and allocates memory bandwidth from 100% down to 10% for the benchmark process. For each allocation, compare perf IMC counter and mbm total bytes from resctrl. The difference between the two values should be within a threshold to pass the test. Default benchmark is built-in fill_buf. But users can specify their own benchmark by option "-b". We can add memory bandwidth allocation for multiple processes in the future. Co-developed-by: Sai Praneeth Prakhya <[email protected]> Signed-off-by: Sai Praneeth Prakhya <[email protected]> Co-developed-by: Babu Moger <[email protected]> Signed-off-by: Babu Moger <[email protected]> Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2020-02-10selftests/resctrl: Add MBM testFenghua Yu1-0/+6
MBM (Memory Bandwidth Monitoring) test is the first implemented selftest. It starts a stressful memory bandwidth benchmark and assigns the bandwidth pid in a resctrl monitoring group. Read and compare perf IMC counter and MBM total bytes for the benchmark. The numbers should be close enough to pass the test. Default benchmark is built-in fill_buf. But users can specify their own benchmark by option "-b". We can add memory bandwidth monitoring for multiple processes in the future. Co-developed-by: Sai Praneeth Prakhya <[email protected]> Signed-off-by: Sai Praneeth Prakhya <[email protected]> Co-developed-by: Babu Moger <[email protected]> Signed-off-by: Babu Moger <[email protected]> Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2020-02-10selftests/resctrl: Add callback to start a benchmarkSai Praneeth Prakhya1-0/+29
The callback starts a child process and puts the child pid in created resctrl group with specified memory bandwidth in schemata. The child starts running benchmark. Signed-off-by: Sai Praneeth Prakhya <[email protected]> Co-developed-by: Babu Moger <[email protected]> Signed-off-by: Babu Moger <[email protected]> Co-developed-by: Fenghua Yu <[email protected]> Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2020-02-10selftests/resctrl: Add basic resctrl file system operations and dataSai Praneeth Prakhya1-0/+50
The basic resctrl file system operations and data are added for future usage by resctrl selftest tool. Signed-off-by: Sai Praneeth Prakhya <[email protected]> Co-developed-by: Babu Moger <[email protected]> Signed-off-by: Babu Moger <[email protected]> Co-developed-by: Fenghua Yu <[email protected]> Signed-off-by: Fenghua Yu <[email protected]> Signed-off-by: Shuah Khan <[email protected]>