All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Auld <pauld@redhat.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: 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,
	linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>
Subject: Re: [RFC] sched: show cpu number when sched_show_task
Date: Wed, 8 Feb 2023 08:48:58 -0500	[thread overview]
Message-ID: <Y+OoSsB27e2LDc3E@lorien.usersys.redhat.com> (raw)
In-Reply-To: <20230208124655.2592560-1-peng.fan@oss.nxp.com>

On Wed, Feb 08, 2023 at 08:46:55PM +0800 Peng Fan (OSS) wrote:
> 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
> 

Looks useful, thanks.

Reviewed-by: Phil Auld <pauld@redhat.com>


-- 


  reply	other threads:[~2023-02-08 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 12:46 [RFC] sched: show cpu number when sched_show_task Peng Fan (OSS)
2023-02-08 13:48 ` Phil Auld [this message]
2023-02-28  1:13   ` Peng Fan

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=Y+OoSsB27e2LDc3E@lorien.usersys.redhat.com \
    --to=pauld@redhat.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.