So after programming the basic L1 and L2 cache related routines in Linux kernel (arch/arm/mm/cache-X.S) say for example specific to ARM11 Processor, is there a test utility/program available to test whether the cache is working properly such that invalidation, flush happens properly. How we can ensure it instead of just relying on our own programs.
You can use the perfcounters subsystem. It's basically an abstraction over CPU performance counters, which are hardware registers recording events like cache misses, instructions executed, branch mispredictions etc. It also provides abstraction for software events (sic) such as minor/major page faults, task migrations, task context-switches and tracepoints. The perf tool can be used to monitor and verify correct cache behaviour - for instance, you can check cache flushing works correctly by filling the cache, flushing it, measuring cache misses on subsequent memory accesses and comparing it to your expected result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With