mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Maxim Levitsky <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: [email protected]
LKML-Reference: <1277968037.1868.120.camel@laptop>
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
9715856922
commit
8c215bd389
4 changed files with 13 additions and 13 deletions
|
|
@ -143,7 +143,7 @@ static inline int which_bucket(unsigned int duration)
|
|||
* This allows us to calculate
|
||||
* E(duration)|iowait
|
||||
*/
|
||||
if (nr_iowait_cpu())
|
||||
if (nr_iowait_cpu(smp_processor_id()))
|
||||
bucket = BUCKETS/2;
|
||||
|
||||
if (duration < 10)
|
||||
|
|
@ -175,7 +175,7 @@ static inline int performance_multiplier(void)
|
|||
mult += 2 * get_loadavg();
|
||||
|
||||
/* for IO wait tasks (per cpu!) we add 5x each */
|
||||
mult += 10 * nr_iowait_cpu();
|
||||
mult += 10 * nr_iowait_cpu(smp_processor_id());
|
||||
|
||||
return mult;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue