aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/fair.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2013-07-04 00:56:46 -0400
committerIngo Molnar <mingo@kernel.org>2013-07-23 06:22:06 -0400
commit7d9ffa8961482232d964173cccba6e14d2d543b2 (patch)
tree80fd615fb64b1bd82e0de0e5d1e8be2bae8cb06d /kernel/sched/fair.c
parent62470419e993f8d9d93db0effd3af4296ecb79a5 (diff)
sched: Micro-optimize the smart wake-affine logic
Smart wake-affine is using node-size as the factor currently, but the overhead of the mask operation is high. Thus, this patch introduce the 'sd_llc_size' percpu variable, which will record the highest cache-share domain size, and make it to be the new factor, in order to reduce the overhead and make it more reasonable. Tested-by: Davidlohr Bueso <davidlohr.bueso@hp.com> Tested-by: Michael Wang <wangyun@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Michael Wang <wangyun@linux.vnet.ibm.com> Cc: Mike Galbraith <efault@gmx.de> Link: http://lkml.kernel.org/r/51D5008E.6030102@linux.vnet.ibm.com [ Tidied up the changelog. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r--kernel/sched/fair.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 860063a8c849..f237437446e5 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3175,7 +3175,7 @@ static inline unsigned long effective_load(struct task_group *tg, int cpu,
3175 3175
3176static int wake_wide(struct task_struct *p) 3176static int wake_wide(struct task_struct *p)
3177{ 3177{
3178 int factor = nr_cpus_node(cpu_to_node(smp_processor_id())); 3178 int factor = this_cpu_read(sd_llc_size);
3179 3179
3180 /* 3180 /*
3181 * Yeah, it's the switching-frequency, could means many wakee or 3181 * Yeah, it's the switching-frequency, could means many wakee or