From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DBB2C433F5 for ; Fri, 8 Apr 2022 12:45:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235879AbiDHMr4 (ORCPT ); Fri, 8 Apr 2022 08:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235915AbiDHMrn (ORCPT ); Fri, 8 Apr 2022 08:47:43 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54809ED90F; Fri, 8 Apr 2022 05:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=yatnqMfFaCYyGLYezkZaTYyAOSonLgPUJNM6A5BO7DM=; b=Bpxqvys6a823O3QpLW+DnlOzu/ FyT1pzKFz3+oiPbRzlCkR+jMtxdA++K+1xjeu1AUAq2SuadWhaxZTc8G45TQe5q+kJqxez/lzyrgy ktnTfsP5bIueHYcfAwYz3KjxXyRoKv5TBc7b5W/7JcVh1NQVSQ3hLKE9M9TOE/H+XhYNjIhJ/RNKL g7HIb/chNo/P6mvJtp2M5RR+LDBVZlUIbI0HJ7IFPrp9aU3GhkY8T91r/ms5CSC4SdkQqhIhPWFuA KLkJQ4swQRYe1SOMhsW193khOPtBxRexKq9dupojrTgk0Jyt9m9W2JTo03uOaYXnwMKXG09AvIMcn Oo8GDnBQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncnzb-009p4y-Gr; Fri, 08 Apr 2022 12:45:35 +0000 Date: Fri, 8 Apr 2022 13:45:35 +0100 From: Matthew Wilcox To: "brookxu.cn" Cc: corbet@lwn.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira Subject: Re: [PATCH] docs/scheduler: Change unit of cpu_time and rq_time to nanoseconds Message-ID: References: <1649410266-32360-1-git-send-email-brookxu.cn@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1649410266-32360-1-git-send-email-brookxu.cn@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 08, 2022 at 05:31:06PM +0800, brookxu.cn wrote: > From: Chunguang Xu > > 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 > --- > 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 >