Skip to content

Commit c19dfb2

Browse files
storulfrafaeljw
authored andcommitted
Documentation: power/cpuidle: Document the CPU system wakeup latency QoS
Let's document how the new CPU system wakeup latency QoS limit can be used from user space, along with how the constraint is taken into account for s2idle and cpuidle. Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Kevin Hilman (TI) <khilman@baylibre.com> Tested-by: Kevin Hilman (TI) <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://patch.msgid.link/20251125112650.329269-7-ulf.hansson@linaro.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 2b8d594 commit c19dfb2

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

Documentation/admin-guide/pm/cpuidle.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,15 @@ the given CPU as the upper limit for the exit latency of the idle states that
580580
they are allowed to select for that CPU. They should never select any idle
581581
states with exit latency beyond that limit.
582582

583+
While the above CPU QoS constraints apply to CPU idle time management, user
584+
space may also request a CPU system wakeup latency QoS limit, via the
585+
`cpu_wakeup_latency` file. This QoS constraint is respected when selecting a
586+
suitable idle state for the CPUs, while entering the system-wide suspend-to-idle
587+
sleep state, but also to the regular CPU idle time management.
588+
589+
Note that, the management of the `cpu_wakeup_latency` file works according to
590+
the 'cpu_dma_latency' file from user space point of view. Moreover, the unit
591+
is also microseconds.
583592

584593
Idle States Control Via Kernel Command Line
585594
===========================================

Documentation/power/pm_qos_interface.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,24 @@ int cpu_latency_qos_request_active(handle):
5555

5656
From user space:
5757

58-
The infrastructure exposes one device node, /dev/cpu_dma_latency, for the CPU
58+
The infrastructure exposes two separate device nodes, /dev/cpu_dma_latency for
59+
the CPU latency QoS and /dev/cpu_wakeup_latency for the CPU system wakeup
5960
latency QoS.
6061

6162
Only processes can register a PM QoS request. To provide for automatic
6263
cleanup of a process, the interface requires the process to register its
6364
parameter requests as follows.
6465

6566
To register the default PM QoS target for the CPU latency QoS, the process must
66-
open /dev/cpu_dma_latency.
67+
open /dev/cpu_dma_latency. To register a CPU system wakeup QoS limit, the
68+
process must open /dev/cpu_wakeup_latency.
6769

6870
As long as the device node is held open that process has a registered
6971
request on the parameter.
7072

7173
To change the requested target value, the process needs to write an s32 value to
7274
the open device node. Alternatively, it can write a hex string for the value
73-
using the 10 char long format e.g. "0x12345678". This translates to a
74-
cpu_latency_qos_update_request() call.
75+
using the 10 char long format e.g. "0x12345678".
7576

7677
To remove the user mode request for a target value simply close the device
7778
node.

0 commit comments

Comments
 (0)