[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180716161127.GB29270@lerouge>
Date: Mon, 16 Jul 2018 18:11:28 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: xlpang@...ux.alibaba.com, tglx@...utronix.de,
lcapitulino@...hat.com, torvalds@...ux-foundation.org,
linux-kernel@...r.kernel.org, hpa@...or.com, tj@...nel.org,
mingo@...nel.org, linux-tip-commits@...r.kernel.org
Subject: Re: [tip:sched/core] sched/cputime: Ensure accurate utime and stime
ratio in cputime_adjust()
On Mon, Jul 16, 2018 at 03:37:51PM +0200, Peter Zijlstra wrote:
> On Sun, Jul 15, 2018 at 04:36:17PM -0700, tip-bot for Xunlei Pang wrote:
> > Commit-ID: 8d4c00dc38a8aa30dae8402955e55e7b34e74bc8
> > Gitweb: https://git.kernel.org/tip/8d4c00dc38a8aa30dae8402955e55e7b34e74bc8
> > Author: Xunlei Pang <xlpang@...ux.alibaba.com>
> > AuthorDate: Mon, 9 Jul 2018 22:58:43 +0800
> > Committer: Ingo Molnar <mingo@...nel.org>
> > CommitDate: Mon, 16 Jul 2018 00:28:31 +0200
> >
> > sched/cputime: Ensure accurate utime and stime ratio in cputime_adjust()
> >
> > If users access "/proc/pid/stat", the utime and stime ratio in the
> > current SAMPLE period are excepted, but currently cputime_adjust()
> > always calculates with the ratio of the WHOLE lifetime of the process.
> >
> > This results in inaccurate utime and stime in "/proc/pid/stat". For
> > example, a process runs for a while with "50% usr, 0% sys", then
> > followed by "100% sys". For later while, the following is excepted:
> >
> > 0.0 usr, 100.0 sys
> >
> > but we get:
> >
> > 10.0 usr, 90.0 sys
> >
> > This patch uses the accurate ratio in cputime_adjust() to address the
> > issue. A new 'task_cputime' type field is added in prev_cputime to record
> > previous 'task_cputime' so that we can get the elapsed times as the accurate
> > ratio.
>
> Ingo, please make this one go away. I still have no idae what the
> problem is and I've not had time to reverse engineer the patch.
>
> The previous (v1) Changelog was a pile of incoherent rambling and the
> above doesn't explain anything much.
>
> I want a clear description of the problem and a coherent explanation of
> the proposed solution without having to reverse engineer the actual
> patch.
I must confess I'm having trouble to understand what the real problem is.
Powered by blists - more mailing lists