From: Xunlei Pang <xlpang@linux.alibaba.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Frederic Weisbecker <frederic@kernel.org>,
Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/cputime: Ensure correct utime and stime proportion
Date: Thu, 5 Jul 2018 21:21:15 +0800 [thread overview]
Message-ID: <bd275aff-61dd-557f-5b91-da4ce82f9501@linux.alibaba.com> (raw)
In-Reply-To: <20180705104632.GE2494@hirez.programming.kicks-ass.net>
On 7/5/18 6:46 PM, Peter Zijlstra wrote:
> On Wed, Jun 27, 2018 at 08:22:42PM +0800, Xunlei Pang wrote:
>> tick-based whole utime is utime_0, tick-based whole stime
>> is stime_0, scheduler time is rtime_0.
>
>> For a long time, the process runs mainly in userspace with
>> run-sleep patterns, and because two different clocks, it
>> is possible to have the following condition:
>> rtime_0 < utime_0 (as with little stime_0)
>
> I don't follow... what?
>
> Why are you, and why do you think it makes sense to, compare rtime_0
> against utime_0 ?
>
> The [us]time_0 are, per your earlier definition, ticks. They're not an
> actual measure of time. Do not compare the two, that makes no bloody
> sense.
>
[us]time_0 is task_struct:utime{stime}, I cited directly from
cputime_adjust(), both in nanoseconds. I assumed "rtime_0 < utime_0"
here to simple the following proof to help explain the problem we met.
next prev parent reply other threads:[~2018-07-05 13:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-22 7:15 [PATCH] sched/cputime: Ensure correct utime and stime proportion Xunlei Pang
2018-06-22 10:35 ` kbuild test robot
2018-06-25 8:14 ` Xunlei Pang
2018-06-26 12:19 ` Xunlei Pang
2018-06-26 15:49 ` Peter Zijlstra
2018-06-27 12:22 ` Xunlei Pang
2018-07-05 10:46 ` Peter Zijlstra
2018-07-05 13:21 ` Xunlei Pang [this message]
2018-07-05 13:42 ` Peter Zijlstra
2018-07-05 13:58 ` xunlei
2018-07-09 10:47 ` Peter Zijlstra
2018-07-09 5:52 ` Xunlei Pang
2018-07-09 10:48 ` Peter Zijlstra
2018-07-09 15:00 ` Xunlei Pang
2018-07-02 15:21 ` Tejun Heo
2018-07-04 6:56 ` Xunlei Pang
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=bd275aff-61dd-557f-5b91-da4ce82f9501@linux.alibaba.com \
--to=xlpang@linux.alibaba.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tj@kernel.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