aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/resctrl
AgeCommit message (Collapse)AuthorFilesLines
2020-03-13selftests/resctrl: fix spelling mistake "Errror" -> "Error"Colin Ian King1-2/+2
There are two spelling mistakes in error messages. Fix these. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2020-02-10selftests/resctrl: Disable MBA and MBM tests for AMDBabu Moger2-4/+4
For now, disable MBA and MBM tests for AMD. Deciding test pass/fail is not clear right now. We can enable when we have some clarity. 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: Use cache index3 id for AMD schemata masksBabu Moger1-2/+7
AMD uses the cache l3 boundary for schemata masks. Update it accordigly. 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 vendor detection mechanismBabu Moger2-0/+25
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 Yu6-5/+451
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 Yu6-20/+558
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 Yu3-1/+188
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 Yu6-1/+368
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 built in benchmarkSai Praneeth Prakhya1-0/+207
Built-in benchmark fill_buf generates stressful memory bandwidth and cache traffic. Later it will be used as a default benchmark by various resctrl tests such as MBA (Memory Bandwidth Allocation) and MBM (Memory Bandwidth Monitoring) tests. 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 callback to start a benchmarkSai Praneeth Prakhya2-0/+603
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: Read memory bandwidth from perf IMC counter and from ↵Sai Praneeth Prakhya1-0/+117
resctrl file system Total memory bandwidth can be monitored from perf IMC counter and from resctrl file system. Later the two will be compared to verify the total memory bandwidth read from resctrl is correct. 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 Prakhya3-0/+524
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]>
2020-02-10selftests/resctrl: Add README for resctrl testsFenghua Yu1-0/+53
resctrl tests will be implemented. README is added for the tool first. 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]>