summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2025-03-05 21:53:53 +0300
committerSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2025-03-07 19:00:21 +0300
commitd74e6e29d2b29919253f625f0c560f4ca2606900 (patch)
tree0e62f3644fc23b01d2ae1a67e023fa7c81a99d0c /tools/perf/scripts/python/task-analyzer.py
parent6ad1b2dc0f2a76b23a31fc7a52ed4ec06e4344a3 (diff)
downloadlinux-d74e6e29d2b29919253f625f0c560f4ca2606900.tar.xz
tools/power/x86/intel-speed-select: Prevent increasing MAX_DIE_PER_PACKAGE
In the function for_each_online_power_domain_in_set() to pick one CPU from each power domain a three-dimensional array is used, which assumes that a package contains multiple dies, that means the die_id from /sys/devices/system/cpu/cpu0/topology/die_id is only local to package. If it is not unique, still there will be no functional issues in the current generation of products, but the MAX_DIE_PER_PACKAGE will need to be increased for future products with many packages. After kernel version 6.9 die ID is unique system wide not per package. Even if the CPU topology has no dies, the ID will still increment across package. In this case the die_id in package 0 will be 0 and die_id in package 1 will be 1 in a 2-package system. Since the die count must be same for packages, just count the number of dies in package 0 and calculate die index from /sys/devices/system/cpu/cpu0/topology/die_id which is only unique within a package. In this way the array size "int cpus[MAX_PACKAGE_COUNT][MAX_DIE_PER_PACKAGE][MAX_PUNIT_PER_DIE]" doesn't have to increase with increasing package count. No functional change is expected. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions