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-next>] [day] [month] [year] [list]
Date:   Fri, 8 Apr 2022 13:45:35 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     "brookxu.cn" <brookxu.cn@...il.com>
Cc:     corbet@....net, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        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>
Subject: Re: [PATCH] docs/scheduler: Change unit of cpu_time and rq_time to
 nanoseconds

On Fri, Apr 08, 2022 at 05:31:06PM +0800, brookxu.cn wrote:
> From: Chunguang Xu <brookxu@...cent.com>
> 
> In the current implementation, cpu_time and rq_time should be
> in nanoseconds, so this document needs to be modified.

I agree that this is wrong, but we shouldn't be changing the units
of measurement reported to userspace without changing the schedstats
version.  I suspect this was an inadvertent change, and we should be
converting from sched_clock() time (~= ns) to jiffies in show_schedstat().
Adding scheduler experts.

> Signed-off-by: Chunguang Xu <brookxu@...cent.com>
> ---
>  Documentation/scheduler/sched-stats.rst | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/scheduler/sched-stats.rst b/Documentation/scheduler/sched-stats.rst
> index dd9b99a..9078a27 100644
> --- a/Documentation/scheduler/sched-stats.rst
> +++ b/Documentation/scheduler/sched-stats.rst
> @@ -56,9 +56,9 @@ Next two are try_to_wake_up() statistics:
>  
>  Next three are statistics describing scheduling latency:
>  
> -     7) sum of all time spent running by tasks on this processor (in jiffies)
> +     7) sum of all time spent running by tasks on this processor (in nanoseconds)
>       8) sum of all time spent waiting to run by tasks on this processor (in
> -        jiffies)
> +        nanoseconds)
>       9) # of timeslices run on this cpu
>  
>  
> -- 
> 1.8.3.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ