Add description of forceidle time statistics, including task perspective and cgroup perspective. Signed-off-by: Cruz Zhao <CruzZhao@xxxxxxxxxxxxxxxxx> --- Documentation/admin-guide/cgroup-v2.rst | 3 ++- .../admin-guide/hw-vuln/core-scheduling.rst | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 17e6e9565156..b82717767c61 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1081,8 +1081,9 @@ All time durations are in microseconds. - user_usec - system_usec - and the following five when the controller is enabled: + and the following six when the controller is enabled: + - core_sched.force_idle_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 cf1eeefdfc32..95a4920a2a9b 100644 --- a/Documentation/admin-guide/hw-vuln/core-scheduling.rst +++ b/Documentation/admin-guide/hw-vuln/core-scheduling.rst @@ -224,3 +224,27 @@ with SMT enabled. There are other use cases where this feature could be used: - Gang scheduling: Requirements for a group of tasks that needs to be scheduled together could also be realized using core scheduling. One example is vCPUs of a VM. + +Statictics +---------- +A task's forceidle statistics are exported via 1 field in procfs. + +/proc/$pid/sched: + + - se.statistics.core_forceidle_sum: Force idle time caused by this task, + unit: ms. It is worth noting that, if this task is running on cpux whose SMT + siblings are forced idle, the irq time of cpux during this period will be + accounted to this task's force idle time. + +This interface is read-only. + +A group's forceidle statistics are exported via 1 filed in cpu.stat. + +cpu.stat: + + - core_sched.force_idle_usec: Force idle time caused by this cgroup' tasks, + unit: us. It is worth nothing that, if this cgroup's task is running on cpux + whose SMT siblings are forced idle, the irq time of cpux during this period + will be accounted to this cgroup's force idle time. + +This interface is read-only. -- 2.39.3