[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251117185550.365156-3-kprateek.nayak@amd.com>
Date: Mon, 17 Nov 2025 18:55:47 +0000
From: K Prateek Nayak <kprateek.nayak@....com>
To: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>, Vincent Guittot
<vincent.guittot@...aro.org>, John Stultz <jstultz@...gle.com>, "Johannes
Weiner" <hannes@...xchg.org>, Suren Baghdasaryan <surenb@...gle.com>,
<linux-kernel@...r.kernel.org>
CC: Dietmar Eggemann <dietmar.eggemann@....com>, Steven Rostedt
<rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>, Mel Gorman
<mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>, K Prateek Nayak
<kprateek.nayak@....com>
Subject: [PATCH 2/5] sched/psi: Prepend "0x" to format specifiers when printing PSI flags
It is not immediately clear that the PSI flags, the set, and the clear
bits printed in PSI warnings are hexadecimal values. Prepend "0x" to
format specifiers to make it clear.
Since "kernel/sched" uses "0x%x" as opposed to "%#x" when printing
hexadecimal values, the same was followed to keep consistency.
Signed-off-by: K Prateek Nayak <kprateek.nayak@....com>
---
kernel/sched/psi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
index 59fdb7ebbf22..b031608c02ce 100644
--- a/kernel/sched/psi.c
+++ b/kernel/sched/psi.c
@@ -830,7 +830,7 @@ static void psi_group_change(struct psi_group *group, int cpu,
if (groupc->tasks[t]) {
groupc->tasks[t]--;
} else if (!psi_bug) {
- printk_deferred(KERN_ERR "psi: task underflow! cpu=%d t=%d tasks=[%u %u %u %u] clear=%x set=%x\n",
+ printk_deferred(KERN_ERR "psi: task underflow! cpu=%d t=%d tasks=[%u %u %u %u] clear=0x%x set=0x%x\n",
cpu, t, groupc->tasks[0],
groupc->tasks[1], groupc->tasks[2],
groupc->tasks[3], clear, set);
@@ -896,7 +896,7 @@ static void psi_flags_change(struct task_struct *task, int clear, int set)
if (((task->psi_flags & set) ||
(task->psi_flags & clear) != clear) &&
!psi_bug) {
- printk_deferred(KERN_ERR "psi: inconsistent task state! task=%d:%s cpu=%d psi_flags=%x clear=%x set=%x\n",
+ printk_deferred(KERN_ERR "psi: inconsistent task state! task=%d:%s cpu=%d psi_flags=0x%x clear=0x%x set=0x%x\n",
task->pid, task->comm, task_cpu(task),
task->psi_flags, clear, set);
psi_bug = 1;
--
2.34.1
Powered by blists - more mailing lists