lkml.org 
[lkml]   [2023]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC] sched: show cpu number when sched_show_task
Date
From: Peng Fan <peng.fan@nxp.com>

It would be helpful to show cpu number when dump task. Such as
when doing system suspend, we could know the failed freezing
process run on which cpu.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index daff72f00385..0c7a1b2f7baf 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8876,7 +8876,7 @@ void sched_show_task(struct task_struct *p)
if (!try_get_task_stack(p))
return;

- pr_info("task:%-15.15s state:%c", p->comm, task_state_to_char(p));
+ pr_info("task:%-15.15s state:%c cpu:0x%x", p->comm, task_state_to_char(p), task_cpu(p));

if (task_is_running(p))
pr_cont(" running task ");
--
2.37.1
\
 
 \ /
  Last update: 2023-03-27 00:15    [W:0.081 / U:0.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site