linux-stable/Documentation/admin-guide/pm
Srinivas Pandruvada 9b8dea80e3 platform/x86/intel-uncore-freq: Support for cluster level controls
An SoC can contain multiple power domains with individual or collection
of mesh partitions. This partition is called fabric cluster.

Certain type of meshes will need to run at the same frequency, they will
be placed in the same fabric cluster. Benefit of fabric cluster is that
it offers a scalable mechanism to deal with partitioned fabrics in a SoC.

The current sysfs interface supports control at package and die level.
This interface is not enough to support more granular control at
fabric cluster level.

SoCs with the support of TPMI (Topology Aware Register and PM Capsule
Interface), can have multiple power domains. Each power domain can
contain one or more fabric clusters.

To support such granular controls, enhance uncore common to optionally
create new directories to provide controls at fabric cluster level. It
is also important to have flexibility to change granularity for future
version of SoCs. If the directory name contains scope like:
"package_*_die_*_power_domain_*_cluster_*", then this is not expandable.

The cpufreq policies also have different scopes. There the scope of the
policy (affected_cpus) specified by attributes inside each policy.
So, follow the same model for uncore frequency scaling sysfs as:
"sys/devices/system/cpu/cpufreq/policy*"

Allow client drivers to optionally support granular control for each
fabric cluster. Here, the directory name will be "uncore" suffixed with
an unique instance number. For example: uncore00, uncore01 etc.
Attributes in the directory identify package id, power domain and
fabric cluster id. This interface is expandable even if some new level
of granularity is introduced. A new sysfs attribute can identify new
level.

For compatibility with the existing sysfs and provide easy way to set
limits for each fabric cluster in the package/die, the existing control
at package/die levels are still provided. For majority of users, this is
an easy approach.

For example: On a single package/die system, with three power domains
and one fabric cluster per power domain:

$tree -L 2 /sys/devices/system/cpu/intel_uncore_frequency/
/sys/devices/system/cpu/intel_uncore_frequency/
├── package_00_die_00
│   ├── current_freq_khz
│   ├── initial_max_freq_khz
│   ├── initial_min_freq_khz
│   ├── max_freq_khz
│   └── min_freq_khz
├── uncore00
│   ├── current_freq_khz
│   ├── domain_id
│   ├── fabric_cluster_id
│   ├── initial_max_freq_khz
│   ├── initial_min_freq_khz
│   ├── max_freq_khz
│   ├── min_freq_khz
│   └── package_id
├── uncore01
│   ├── current_freq_khz
│   ├── domain_id
│   ├── fabric_cluster_id
│   ├── initial_max_freq_khz
│   ├── initial_min_freq_khz
│   ├── max_freq_khz
│   ├── min_freq_khz
│   └── package_id
└── uncore02
    ├── current_freq_khz
    ├── domain_id
    ├── fabric_cluster_id
    ├── initial_max_freq_khz
    ├── initial_min_freq_khz
    ├── max_freq_khz
    ├── min_freq_khz
    └── package_id

The attribute for cluster id is "fabric_cluster_id" instead of just
"cluster_id" is to avoid confusion with usage of term clusters in
other part of the Linux kernel.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Wendy Wang <wendy.wang@intel.com>
Link: https://lore.kernel.org/r/20230418171340.681662-3-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-05-09 11:54:42 +02:00
..
amd-pstate.rst Documentation: cpufreq: amd-pstate: Update amd_pstate status sysfs for guided 2023-03-17 19:06:23 +01:00
cpufreq.rst docs: remove some replace macros like |struct foo| 2020-10-15 07:49:40 +02:00
cpufreq_drivers.rst Documentation: cpufreq: Move legacy driver documentation 2020-03-02 11:31:06 +01:00
cpuidle.rst x86: Handle idle=nomwait cmdline properly for x86_idle 2022-06-08 12:58:58 -07:00
index.rst Documentation: PM: Add SPDX license tags to multiple files 2019-04-08 12:57:47 +02:00
intel-speed-select.rst Documentation: admin-guide: PM: Add Out of Band mode 2022-05-25 15:48:26 +02:00
intel_epb.rst admin-guide: pm: intel_epb: Add SPDX license tag and copyright notice 2019-04-08 12:59:09 +02:00
intel_idle.rst docs: admin-guide: pm: avoid using ReST :doc:`foo` markup 2021-06-17 13:24:36 -06:00
intel_pstate.rst docs: ftrace: always use canonical ftrace path 2023-01-31 14:02:30 -07:00
intel_uncore_frequency_scaling.rst platform/x86/intel-uncore-freq: Support for cluster level controls 2023-05-09 11:54:42 +02:00
sleep-states.rst Documentation: admin-guide: PM: Update sleep states documentation 2020-02-03 11:58:26 +01:00
strategies.rst Documentation: PM: Unify copyright notices 2019-04-08 12:57:47 +02:00
suspend-flows.rst Documentation: PM: sleep: Document system-wide suspend code flows 2020-04-03 11:41:01 +02:00
system-wide.rst Documentation: PM: sleep: Document system-wide suspend code flows 2020-04-03 11:41:01 +02:00
working-state.rst Documentation: admin-guide: pm: Document uncore frequency scaling 2022-03-01 16:46:53 +01:00