Skip to content

Commit 8e0cbf3

Browse files
mrhpearsonrafaeljw
authored andcommitted
Documentation: Add documentation for new platform_profile sysfs attribute
On modern systems the platform performance, temperature, fan and other hardware related characteristics are often dynamically configurable. The profile is often automatically adjusted to the load by some automatic-mechanism (which may very well live outside the kernel). These auto platform-adjustment mechanisms often can be configured with one of several 'platform-profiles', with either a bias towards low-power consumption or towards performance (and higher power consumption and thermals). Introduce a new platform_profile sysfs API which offers a generic API for selecting the performance-profile of these automatic-mechanisms. Co-developed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Pearson <markpearson@lenovo.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 5c8fe58 commit 8e0cbf3

3 files changed

Lines changed: 67 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
What: /sys/firmware/acpi/platform_profile_choices
2+
Date: October 2020
3+
Contact: Hans de Goede <hdegoede@redhat.com>
4+
Description: This file contains a space-separated list of profiles supported for this device.
5+
6+
Drivers must use the following standard profile-names:
7+
8+
============ ============================================
9+
low-power Low power consumption
10+
cool Cooler operation
11+
quiet Quieter operation
12+
balanced Balance between low power consumption and performance
13+
performance High performance operation
14+
============ ============================================
15+
16+
Userspace may expect drivers to offer more than one of these
17+
standard profile names.
18+
19+
What: /sys/firmware/acpi/platform_profile
20+
Date: October 2020
21+
Contact: Hans de Goede <hdegoede@redhat.com>
22+
Description: Reading this file gives the current selected profile for this
23+
device. Writing this file with one of the strings from
24+
platform_profile_choices changes the profile to the new value.

‎Documentation/userspace-api/index.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ place where this information is gathered.
2424
ioctl/index
2525
iommu
2626
media/index
27+
sysfs-platform_profile
2728

2829
.. only:: subproject and html
2930

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
=====================================================================
2+
Platform Profile Selection (e.g. /sys/firmware/acpi/platform_profile)
3+
=====================================================================
4+
5+
On modern systems the platform performance, temperature, fan and other
6+
hardware related characteristics are often dynamically configurable. The
7+
platform configuration is often automatically adjusted to the current
8+
conditions by some automatic mechanism (which may very well live outside
9+
the kernel).
10+
11+
These auto platform adjustment mechanisms often can be configured with
12+
one of several platform profiles, with either a bias towards low power
13+
operation or towards performance.
14+
15+
The purpose of the platform_profile attribute is to offer a generic sysfs
16+
API for selecting the platform profile of these automatic mechanisms.
17+
18+
Note that this API is only for selecting the platform profile, it is
19+
NOT a goal of this API to allow monitoring the resulting performance
20+
characteristics. Monitoring performance is best done with device/vendor
21+
specific tools such as e.g. turbostat.
22+
23+
Specifically when selecting a high performance profile the actual achieved
24+
performance may be limited by various factors such as: the heat generated
25+
by other components, room temperature, free air flow at the bottom of a
26+
laptop, etc. It is explicitly NOT a goal of this API to let userspace know
27+
about any sub-optimal conditions which are impeding reaching the requested
28+
performance level.
29+
30+
Since numbers on their own cannot represent the multiple variables that a
31+
profile will adjust (power consumption, heat generation, etc) this API
32+
uses strings to describe the various profiles. To make sure that userspace
33+
gets a consistent experience the sysfs-platform_profile ABI document defines
34+
a fixed set of profile names. Drivers *must* map their internal profile
35+
representation onto this fixed set.
36+
37+
If there is no good match when mapping then a new profile name may be
38+
added. Drivers which wish to introduce new profile names must:
39+
40+
1. Explain why the existing profile names canot be used.
41+
2. Add the new profile name, along with a clear description of the
42+
expected behaviour, to the sysfs-platform_profile ABI documentation.

0 commit comments

Comments
 (0)