mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "brookxu.cn" <brookxu.cn@gmail.com>
Cc: corbet@lwn.net, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>
Subject: Re: [PATCH] docs/scheduler: Change unit of cpu_time and rq_time to nanoseconds
Date: Fri, 8 Apr 2022 13:45:35 +0100	[thread overview]
Message-ID: <YlAub2NXBPeNcyAS@casper.infradead.org> (raw)
In-Reply-To: <1649410266-32360-1-git-send-email-brookxu.cn@gmail.com>

On Fri, Apr 08, 2022 at 05:31:06PM +0800, brookxu.cn wrote:
> From: Chunguang Xu <brookxu@tencent.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@tencent.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
> 

       reply	other threads:[~2022-04-08 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1649410266-32360-1-git-send-email-brookxu.cn@gmail.com>
2022-04-08 12:45 ` Matthew Wilcox [this message]
2022-04-08 13:43   ` Peter Zijlstra
2022-04-16  8:36     ` Jonathan Corbet

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=YlAub2NXBPeNcyAS@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=bristot@redhat.com \
    --cc=brookxu.cn@gmail.com \
    --cc=bsegall@google.com \
    --cc=corbet@lwn.net \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome