[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160308122924.GB9122@lerouge>
Date: Tue, 8 Mar 2016 13:29:27 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Chris Friesen <cbf123@...l.usask.ca>
Cc: Thomas Gleixner <tglx@...utronix.de>,
John Stultz <john.stultz@...aro.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
lkml <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, Rik van Riel <riel@...hat.com>
Subject: Re: [PATCH v2] sched/cputime: steal_account_process_tick() should
return jiffies
On Sat, Mar 05, 2016 at 11:18:48PM -0600, Chris Friesen wrote:
> The callers of steal_account_process_tick() expect it to return
> whether a jiffy should be considered stolen or not.
>
> Currently the return value of steal_account_process_tick() is in
> units of cputime, which vary between either jiffies or nsecs
> depending on CONFIG_VIRT_CPU_ACCOUNTING_GEN.
>
> If cputime has nsecs granularity and there is a tiny amount of
> stolen time (a few nsecs, say) then we will consider the entire
> tick stolen and will not account the tick on user/system/idle,
> causing /proc/stats to show invalid data.
>
> The fix is to change steal_account_process_tick() to accumulate
> the stolen time and only account it once it's worth a jiffy.
>
> (Thanks to Frederic Weisbecker for suggestions to fix a bug in my
> first version of the patch.)
>
> Signed-off-by: Chris Friesen <chris.friesen@...driver.com>
Acked-by: Frederic Weisbecker <fweisbec@...il.com>
Thanks Chris!
Powered by blists - more mailing lists