linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valentin Schneider <valentin.schneider@arm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, peterz@infradead.org,
	vincent.guittot@linaro.org, Dietmar.Eggemann@arm.com,
	patrick.bellasi@matbug.net, qais.yousef@arm.com,
	t1zhou@aliyun.com
Subject: [PATCH v2 3/3] sched/debug: Add task uclamp values to SCHED_DEBUG procfs
Date: Wed, 26 Feb 2020 12:45:43 +0000	[thread overview]
Message-ID: <20200226124543.31986-4-valentin.schneider@arm.com> (raw)
In-Reply-To: <20200226124543.31986-1-valentin.schneider@arm.com>

Requested and effective uclamp values can be a bit tricky to decipher when
playing with cgroup hierarchies. Add them to a task's procfs when
SCHED_DEBUG is enabled.

Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
---
 kernel/sched/debug.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 315ef6de3cc4..a562df57a86e 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -946,6 +946,12 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
 	P(se.avg.last_update_time);
 	P(se.avg.util_est.ewma);
 	P(se.avg.util_est.enqueued);
+#endif
+#ifdef CONFIG_UCLAMP_TASK
+	__PS("uclamp.min", p->uclamp[UCLAMP_MIN].value);
+	__PS("uclamp.max", p->uclamp[UCLAMP_MAX].value);
+	__PS("effective uclamp.min", uclamp_eff_value(p, UCLAMP_MIN));
+	__PS("effective uclamp.max", uclamp_eff_value(p, UCLAMP_MAX));
 #endif
 	P(policy);
 	P(prio);
-- 
2.24.0


  parent reply	other threads:[~2020-02-26 12:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 12:45 [PATCH v2 0/3] sched/debug: Add uclamp values to procfs Valentin Schneider
2020-02-26 12:45 ` [PATCH v2 1/3] sched/debug: Remove redundant macro define Valentin Schneider
2020-04-08 12:20   ` [tip: sched/urgent] " tip-bot2 for Valentin Schneider
2020-02-26 12:45 ` [PATCH v2 2/3] sched/debug: Bunch up printing formats in common macros Valentin Schneider
2020-04-08 12:20   ` [tip: sched/urgent] sched/debug: Factor out printing formats into " tip-bot2 for Valentin Schneider
2020-02-26 12:45 ` Valentin Schneider [this message]
2020-04-08 12:20   ` [tip: sched/urgent] sched/debug: Add task uclamp values to SCHED_DEBUG procfs tip-bot2 for Valentin Schneider
2020-02-27 10:42 ` [PATCH v2 0/3] sched/debug: Add uclamp values to procfs Qais Yousef

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=20200226124543.31986-4-valentin.schneider@arm.com \
    --to=valentin.schneider@arm.com \
    --cc=Dietmar.Eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=patrick.bellasi@matbug.net \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=t1zhou@aliyun.com \
    --cc=vincent.guittot@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).