diff options
| author | Frederic Weisbecker <[email protected]> | 2016-08-11 14:58:24 +0200 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2016-08-11 16:34:37 +0200 |
| commit | 26f2c75cd2cf10a6120ef02ca9a94db77cc9c8e0 (patch) | |
| tree | a40a52dd64287f1273734de3de99d1bc6be18f44 /kernel | |
| parent | f9bcf1e0e0145323ba2cf72ecad5264ff3883eb1 (diff) | |
sched/cputime: Fix omitted ticks passed in parameter
Commit:
f9bcf1e0e014 ("sched/cputime: Fix steal time accounting")
... fixes a leak on steal time accounting but forgets to account
the ticks passed in parameters, assuming there is only one to
take into account.
Let's consider that parameter back.
Signed-off-by: Frederic Weisbecker <[email protected]>
Acked-by: Wanpeng Li <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Radim <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Wanpeng Li <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/20160811125822.GB4214@lerouge
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/cputime.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index 8b9bcc5a58fa..9858266fb0b3 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c @@ -509,12 +509,13 @@ void account_process_tick(struct task_struct *p, int user_tick) void account_idle_ticks(unsigned long ticks) { cputime_t cputime, steal; + if (sched_clock_irqtime) { irqtime_account_idle_ticks(ticks); return; } - cputime = cputime_one_jiffy; + cputime = jiffies_to_cputime(ticks); steal = steal_account_process_time(cputime); if (steal >= cputime) |