diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-12-07 09:07:31 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-12-21 04:34:44 -0500 |
commit | 518cd62341786aa4e3839810832af2fbc0de1ea4 (patch) | |
tree | bd28f7fce47887e9c5d33bd772c8380255ef3065 /kernel/sched/fair.c | |
parent | 612ef28a045efadb3a98d4492ead7806a146485d (diff) |
sched: Only queue remote wakeups when crossing cache boundaries
Mike reported a 13% drop in netperf TCP_RR performance due to the
new remote wakeup code. Suresh too noticed some performance issues
with it.
Reducing the IPIs to only cross cache domains solves the observed
performance issues.
Reported-by: Suresh Siddha <suresh.b.siddha@intel.com>
Reported-by: Mike Galbraith <efault@gmx.de>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Dave Kleikamp <dave.kleikamp@oracle.com>
Link: http://lkml.kernel.org/r/1323338531.17673.7.camel@twins
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index a4d2b7abc3cd..2237ffefdbce 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
@@ -2644,28 +2644,6 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu) | |||
2644 | return idlest; | 2644 | return idlest; |
2645 | } | 2645 | } |
2646 | 2646 | ||
2647 | /** | ||
2648 | * highest_flag_domain - Return highest sched_domain containing flag. | ||
2649 | * @cpu: The cpu whose highest level of sched domain is to | ||
2650 | * be returned. | ||
2651 | * @flag: The flag to check for the highest sched_domain | ||
2652 | * for the given cpu. | ||
2653 | * | ||
2654 | * Returns the highest sched_domain of a cpu which contains the given flag. | ||
2655 | */ | ||
2656 | static inline struct sched_domain *highest_flag_domain(int cpu, int flag) | ||
2657 | { | ||
2658 | struct sched_domain *sd, *hsd = NULL; | ||
2659 | |||
2660 | for_each_domain(cpu, sd) { | ||
2661 | if (!(sd->flags & flag)) | ||
2662 | break; | ||
2663 | hsd = sd; | ||
2664 | } | ||
2665 | |||
2666 | return hsd; | ||
2667 | } | ||
2668 | |||
2669 | /* | 2647 | /* |
2670 | * Try and locate an idle CPU in the sched_domain. | 2648 | * Try and locate an idle CPU in the sched_domain. |
2671 | */ | 2649 | */ |
@@ -2696,7 +2674,7 @@ static int select_idle_sibling(struct task_struct *p, int target) | |||
2696 | */ | 2674 | */ |
2697 | rcu_read_lock(); | 2675 | rcu_read_lock(); |
2698 | 2676 | ||
2699 | sd = highest_flag_domain(target, SD_SHARE_PKG_RESOURCES); | 2677 | sd = rcu_dereference(per_cpu(sd_llc, target)); |
2700 | for_each_lower_domain(sd) { | 2678 | for_each_lower_domain(sd) { |
2701 | sg = sd->groups; | 2679 | sg = sd->groups; |
2702 | do { | 2680 | do { |