Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1460651
| From | tip-bot for Frederic Weisbecker <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:sched/urgent] sched/cputime: Fix omitted ticks passed in parameter |
| Date | 2016-08-11 18:30 +0200 |
| Message-ID | <s511L-6al-9@gated-at.bofh.it> (permalink) |
| References | <s4XKx-3Wr-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: 26f2c75cd2cf10a6120ef02ca9a94db77cc9c8e0
Gitweb: http://git.kernel.org/tip/26f2c75cd2cf10a6120ef02ca9a94db77cc9c8e0
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Thu, 11 Aug 2016 14:58:24 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 11 Aug 2016 16:34:37 +0200
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 <fweisbec@gmail.com>
Acked-by: Wanpeng Li <kernellwp@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Radim <rkrcmar@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Cc: linux-tip-commits@vger.kernel.org
Link: http://lkml.kernel.org/r/20160811125822.GB4214@lerouge
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/cputime.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index 8b9bcc5..9858266 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)
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] sched/cputime: Fix fold steal time into idle time accounting Wanpeng Li <kernellwp@gmail.com> - 2016-08-11 07:50 +0200
[tip:sched/urgent] sched/cputime: Fix steal time accounting tip-bot for Wanpeng Li <tipbot@zytor.com> - 2016-08-11 14:00 +0200
[PATCH] cputime: Fix omitted ticks passed in parameter (was: Re: [tip:sched/urgent] sched/cputime: Fix steal time accounting) Frederic Weisbecker <fweisbec@gmail.com> - 2016-08-11 15:00 +0200
Re: [PATCH] cputime: Fix omitted ticks passed in parameter (was: Re: [tip:sched/urgent] sched/cputime: Fix steal time accounting) Wanpeng Li <kernellwp@gmail.com> - 2016-08-11 15:10 +0200
[tip:sched/urgent] sched/cputime: Fix omitted ticks passed in parameter tip-bot for Frederic Weisbecker <tipbot@zytor.com> - 2016-08-11 18:30 +0200
csiph-web