[PATCH v2 3/3] Documentation: add description of forceidle_task time statistics

From: Cruz Zhao
Date: Thu Mar 07 2024 - 05:20:31 EST


Add description of forceidle_task time statistics, including task
perspective and cgroup perspective. The difference from forceidle
time is that, forceidle_task time doesn't contain irq time.

Signed-off-by: Cruz Zhao <CruzZhao@xxxxxxxxxxxxxxxxx>
---
Documentation/admin-guide/cgroup-v2.rst | 3 ++-
Documentation/admin-guide/hw-vuln/core-scheduling.rst | 8 +++++++-
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index b82717767c61..46de2bfa9a0f 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1081,9 +1081,10 @@ All time durations are in microseconds.
- user_usec
- system_usec

- and the following six when the controller is enabled:
+ and the following seven when the controller is enabled:

- core_sched.force_idle_usec
+ - core_sched.force_idle_task_usec
- nr_periods
- nr_throttled
- throttled_usec
diff --git a/Documentation/admin-guide/hw-vuln/core-scheduling.rst b/Documentation/admin-guide/hw-vuln/core-scheduling.rst
index 95a4920a2a9b..536931ed283a 100644
--- a/Documentation/admin-guide/hw-vuln/core-scheduling.rst
+++ b/Documentation/admin-guide/hw-vuln/core-scheduling.rst
@@ -227,7 +227,7 @@ with SMT enabled. There are other use cases where this feature could be used:

Statictics
----------
-A task's forceidle statistics are exported via 1 field in procfs.
+A task's forceidle statistics are exported via 2 field in procfs.

/proc/$pid/sched:

@@ -236,6 +236,9 @@ A task's forceidle statistics are exported via 1 field in procfs.
siblings are forced idle, the irq time of cpux during this period will be
accounted to this task's force idle time.

+ - se.statistics.core_forceidle_task_sum: The time that this task is actually
+ running on cpu whose SMT siblings are forced idle, unit: ms.
+
This interface is read-only.

A group's forceidle statistics are exported via 1 filed in cpu.stat.
@@ -247,4 +250,7 @@ cpu.stat:
whose SMT siblings are forced idle, the irq time of cpux during this period
will be accounted to this cgroup's force idle time.

+ - core_sched.force_idle_task_usec: The time that this cgroup's tasks are
+ actually running on cpu whose SMT siblings are forced idle, unit: us.
+
This interface is read-only.
--
2.39.3