lkml.org 
[lkml]   [2023]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched: print parent comm in sched_show_task()
Hi,
On 2023-01-10 at 17:35:34 +0800, Yuanhan Zhang wrote:
> Hi Petr and Chen,
> Thanks for your emails! Petr's suggestions sure make a lot of sense.
> Please review the following implementation, it would print a new line like:
> " parent:kthreadd ppid:2 "
> after the origin line.
>
> ---
>
> kernel/sched/core.c | 15 ++++++++-------
>
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
>
> index cb2aa2b54c7a..86ee90404ddb 100644
>
> --- a/kernel/sched/core.c
>
> +++ b/kernel/sched/core.c
>
> @@ -8853,7 +8853,7 @@ SYSCALL_DEFINE2(sched_rr_get_interval_time32, pid_t,
> pid,
>
> void sched_show_task(struct task_struct *p)
>
> {
>
> unsigned long free = 0;
>
> - int ppid;
>
> + struct task_struct *parent;
>
Above line could be moved inside: if (pid_alive(p)).
And the format of this patch seems to be broken, please resend after fixing the issues
reported by scripts/checkpatch.pl

thanks,
Chenyu

\
 
 \ /
  Last update: 2023-03-26 23:37    [W:0.094 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site