projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ae11c9
)
sched/fair: Optimize find_busiest_queue()
author
Peter Zijlstra
<peterz@infradead.org>
Mon, 19 Aug 2013 13:20:21 +0000
(15:20 +0200)
committer
Ingo Molnar
<mingo@kernel.org>
Mon, 2 Sep 2013 06:27:37 +0000
(08:27 +0200)
Use for_each_cpu_and() and thereby avoid computing the capacity for
CPUs we know we're not interested in.
Reviewed-by: Paul Turner <pjt@google.com>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link:
http://lkml.kernel.org/n/tip-lppceyv6kb3a19g8spmrn20b@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/sched/fair.c
b/kernel/sched/fair.c
index ccf20e76b6b2e9ef913902bbf14ea481cae4c602..bedd30b168a57f43bf6db5af46fb56e730f5b403 100644
(file)
--- a/
kernel/sched/fair.c
+++ b/
kernel/sched/fair.c
@@
-4946,7
+4946,7
@@
static struct rq *find_busiest_queue(struct lb_env *env,
unsigned long busiest_load = 0, busiest_power = 1;
int i;
- for_each_cpu
(i, sched_group_cpus(group)
) {
+ for_each_cpu
_and(i, sched_group_cpus(group), env->cpus
) {
unsigned long power = power_of(i);
unsigned long capacity = DIV_ROUND_CLOSEST(power,
SCHED_POWER_SCALE);
@@
-4955,9
+4955,6
@@
static struct rq *find_busiest_queue(struct lb_env *env,
if (!capacity)
capacity = fix_small_capacity(env->sd, group);
- if (!cpumask_test_cpu(i, env->cpus))
- continue;
-
rq = cpu_rq(i);
wl = weighted_cpuload(i);