From: Cruz Zhao <CruzZhao@linux.alibaba.com>
To: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org,
mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com, vschneid@redhat.com
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/3] Documentation: add description of forceidle time statistics
Date: Thu, 7 Mar 2024 18:19:43 +0800 [thread overview]
Message-ID: <20240307101945.11280-2-CruzZhao@linux.alibaba.com> (raw)
In-Reply-To: <20240307101945.11280-1-CruzZhao@linux.alibaba.com>
Add description of forceidle time statistics, including task perspective
and cgroup perspective.
Signed-off-by: Cruz Zhao <CruzZhao@linux.alibaba.com>
---
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
next prev parent reply other threads:[~2024-03-07 10:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 10:19 [PATCH v2 0/3] introduce CPUTIME_FORCEIDLE_TASK and add Cruz Zhao
2024-03-07 10:19 ` Cruz Zhao [this message]
2024-03-07 10:19 ` [PATCH v2 2/3] sched/core: introduce CPUTIME_FORCEIDLE_TASK Cruz Zhao
2024-03-07 10:19 ` [PATCH v2 3/3] Documentation: add description of forceidle_task time statistics Cruz Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240307101945.11280-2-CruzZhao@linux.alibaba.com \
--to=cruzzhao@linux.alibaba.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=cgroups@vger.kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=hannes@cmpxchg.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®