lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YOgbA/+Mm+tHKwqN@hirez.programming.kicks-ass.net>
Date:   Fri, 9 Jul 2021 11:46:43 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     zhouchuangao <zhouchuangao@...o.com>
Cc:     Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel/sched/core: Print the time when the process
 entered the D state

On Thu, Jul 08, 2021 at 10:05:59PM -0700, zhouchuangao wrote:
> Sometimes we need to trigger /proc/sysrq-trigger to view the information
> of the D state process in the system.
> e.g:
> echo w > /proc/sysrq-trigger
> 
> Here we print the scheduling time of the process, which is convenient
> for us to judge the state of the system and for debugging.
> 
> Signed-off-by: zhouchuangao <zhouchuangao@...o.com>
> ---
>  kernel/sched/core.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index cf16f8f..e03474d 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -8154,9 +8154,10 @@ void sched_show_task(struct task_struct *p)
>  	if (pid_alive(p))
>  		ppid = task_pid_nr(rcu_dereference(p->real_parent));
>  	rcu_read_unlock();
> -	pr_cont(" stack:%5lu pid:%5d ppid:%6d flags:0x%08lx\n",
> +	pr_cont(" stack:%5lu pid:%5d ppid:%6d flags:0x%08lx sched:%llu\n",
>  		free, task_pid_nr(p), ppid,
> -		(unsigned long)task_thread_info(p)->flags);
> +		(unsigned long)task_thread_info(p)->flags,
> +		p->sched_info.last_arrival);

How's that not a compile fail for SCHED_INFO=n ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ