Re: [RFC PATCH 1/4] perf: Read cache instance ID when building cache topology
From: K Prateek Nayak
Date: Sun Apr 02 2023 - 22:43:52 EST
Hello Arnaldo,
Thank you for taking a look at the series.
On 3/31/2023 5:24 PM, Arnaldo Carvalho de Melo wrote:
> Em Fri, Mar 31, 2023 at 10:21:14AM +0530, K Prateek Nayak escreveu:
>> CPU cache level data currently stores cache level, type, line size,
>> associativity, sets, total cache size, and the CPUs sharing the cache.
>> Also read and store the cache instance ID from
>> "/sys/devices/system/cpu/cpuX/cache/indexY/id" in the cache level data.
>> Use instance ID as well when comparing cache levels.
>
> And if a new perf tool is used in an older kernel without this new 'id'
> file?
>
> Please check if the file exists, if it doesn't don't fail, just
> initialize with a zero, this way the latest perf will be usable in older
> kernels.
That makes sense. I'll handle this case as you suggested in the next
version.
>
> - Arnaldo
>
>> [..snip..]
>
--
Thanks and Regards,
Prateek