Skip to contentSkip to conversation

sched/debug: Fix requested task uclamp values shown in procfs

PATCH In review Pavankumar Kondeti 2 participants 2 messages May 11, 2020 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sched/debug: Fix requested task uclamp values shown in procfs

The intention of commit 96e74ebf8d59 ("sched/debug: Add task uclamp values to SCHED_DEBUG procfs") was to print requested and effective task uclamp values. The requested values printed are read from p->uclamp, which holds the last effective values. Fix this by printing the values from p->uclamp_req.

Fixes 96e74ebf8d59 ("sched/debug: Add task uclamp values to SCHED_DEBUG procfs")

---

V2: Added "requested" prefix (suggested by Valentin)

 kernel/sched/debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/debug.c +2 -2
index a562df5..77ecebd 100644
@@ -948,8 +948,8 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
 	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("requested uclamp.min", p->uclamp_req[UCLAMP_MIN].value);
+	__PS("requested uclamp.max", p->uclamp_req[UCLAMP_MAX].value);
 	__PS("effective uclamp.min", uclamp_eff_value(p, UCLAMP_MIN));
 	__PS("effective uclamp.max", uclamp_eff_value(p, UCLAMP_MAX));
 #endif
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Pavankumar Kondeti

The intention of commit 96e74ebf8d59 ("sched/debug: Add task uclamp values to SCHED_DEBUG procfs") was to print requested and effective task uclamp values. The requested values printed are read from p->uclamp, which holds the last effective values. Fix this by printing the values from p->uclamp_req.

Quoted 6 lines
Fixes 96e74ebf8d59 ("sched/debug: Add task uclamp values to SCHED_DEBUG procfs")

---

V2: Added "requested" prefix (suggested by Valentin)

Quoted 19 lines
 kernel/sched/debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/debug.c +2 -2
index a562df5..77ecebd 100644
@@ -948,8 +948,8 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
 	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("requested uclamp.min", p->uclamp_req[UCLAMP_MIN].value);
+	__PS("requested uclamp.max", p->uclamp_req[UCLAMP_MAX].value);
 	__PS("effective uclamp.min", uclamp_eff_value(p, UCLAMP_MIN));
 	__PS("effective uclamp.max", uclamp_eff_value(p, UCLAMP_MAX));
 #endif