linux/tools/power/x86
Srinivas Pandruvada fb18615828 tools/power/x86/intel-speed-select: Store topology information
Once the CPU is offline, the topology information (core-id, package-id,
die-id) is not accessible via sysfs. So when user selects a config level
more than base config 0 and offlined CPUs to match the config level,
to return to base config he has to manually online CPUs before. Without
this CPUs information mapping from Punit CPU numbering will lot work
as it needs atlest package id for each CPU.

To avoid this additional steps store the topology information in a file
, which is created on the very first run after boot. Since system boots
in base config and all CPUs are online, we can get information about
every CPU.

Once any of the APIs like get_physical_package_id(),
get_physical_core_id() or get_physical_die_id() fails to read from
sysfs, read from the stored mapping file.

This mapping file is stored in /tmp file system. so on every boot
it is recreated to make sure that any new CPUs are added to the
system before boot are taken into account.

But don't use the stored physical device id  when trying to get
information for CPU to send message in for_each_online_package_in_set().
Here use the real value from syfs and in case fails try the next CPU.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2020-03-20 14:46:20 +02:00
..
intel_pstate_tracer tools/power/x86/intel_pstate_tracer: change several graphs to autoscale y-axis 2020-01-28 23:46:03 +01:00
intel-speed-select tools/power/x86/intel-speed-select: Store topology information 2020-03-20 14:46:20 +02:00
turbostat tools/x86: Sync msr-index.h from kernel sources 2020-01-13 17:42:57 +01:00
x86_energy_perf_policy tools/power x86_energy_perf_policy: Fix argument parsing 2019-08-31 14:48:34 -04:00