diff options
author | Peter Zijlstra <peterz@infradead.org> | 2010-07-01 03:07:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-07-01 03:39:48 -0400 |
commit | 8c215bd3890c347dfb6a2db4779755f8b9c298a9 (patch) | |
tree | e6bd5de8a028babe9ec75f744977bd1424df106c /kernel/sched.c | |
parent | 9715856922bf8475f5428c29b6f4a9eebc97d391 (diff) |
sched: Cure nr_iowait_cpu() users
Commit 0224cf4c5e (sched: Intoduce get_cpu_iowait_time_us())
broke things by not making sure preemption was indeed disabled
by the callers of nr_iowait_cpu() which took the iowait value of
the current cpu.
This resulted in a heap of preempt warnings. Cure this by making
nr_iowait_cpu() take a cpu number and fix up the callers to pass
in the right number.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-pm@lists.linux-foundation.org
LKML-Reference: <1277968037.1868.120.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index a24d6d5d83f6..f87abe3b0176 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -2864,9 +2864,9 @@ unsigned long nr_iowait(void) | |||
2864 | return sum; | 2864 | return sum; |
2865 | } | 2865 | } |
2866 | 2866 | ||
2867 | unsigned long nr_iowait_cpu(void) | 2867 | unsigned long nr_iowait_cpu(int cpu) |
2868 | { | 2868 | { |
2869 | struct rq *this = this_rq(); | 2869 | struct rq *this = cpu_rq(cpu); |
2870 | return atomic_read(&this->nr_iowait); | 2870 | return atomic_read(&this->nr_iowait); |
2871 | } | 2871 | } |
2872 | 2872 | ||