aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorChen, Kenneth W <kenneth.w.chen@intel.com>2006-02-14 16:53:10 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-14 19:09:34 -0500
commitd6077cb80cde4506720f9165eba99ee07438513f (patch)
treef4462e51cf0a14a113c0c524711636c8429424bb /kernel
parentf822566165dd46ff5de9bf895cfa6c51f53bb0c4 (diff)
[PATCH] sched: revert "filter affine wakeups"
Revert commit d7102e95b7b9c00277562c29aad421d2d521c5f6: [PATCH] sched: filter affine wakeups Apparently caused more than 10% performance regression for aim7 benchmark. The setup in use is 16-cpu HP rx8620, 64Gb of memory and 12 MSA1000s with 144 disks. Each disk is 72Gb with a single ext3 filesystem (courtesy of HP, who supplied benchmark results). The problem is, for aim7, the wake-up pattern is random, but it still needs load balancing action in the wake-up path to achieve best performance. With the above commit, lack of load balancing hurts that workload. However, for workloads like database transaction processing, the requirement is exactly opposite. In the wake up path, best performance is achieved with absolutely zero load balancing. We simply wake up the process on the CPU that it was previously run. Worst performance is obtained when we do load balancing at wake up. There isn't an easy way to auto detect the workload characteristics. Ingo's earlier patch that detects idle CPU and decide whether to load balance or not doesn't perform with aim7 either since all CPUs are busy (it causes even bigger perf. regression). Revert commit d7102e95b7b9c00277562c29aad421d2d521c5f6, which causes more than 10% performance regression with aim7. Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 87d93be336a1..66d957227de9 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1204,9 +1204,6 @@ static int try_to_wake_up(task_t *p, unsigned int state, int sync)
1204 } 1204 }
1205 } 1205 }
1206 1206
1207 if (p->last_waker_cpu != this_cpu)
1208 goto out_set_cpu;
1209
1210 if (unlikely(!cpu_isset(this_cpu, p->cpus_allowed))) 1207 if (unlikely(!cpu_isset(this_cpu, p->cpus_allowed)))
1211 goto out_set_cpu; 1208 goto out_set_cpu;
1212 1209
@@ -1277,8 +1274,6 @@ out_set_cpu:
1277 cpu = task_cpu(p); 1274 cpu = task_cpu(p);
1278 } 1275 }
1279 1276
1280 p->last_waker_cpu = this_cpu;
1281
1282out_activate: 1277out_activate:
1283#endif /* CONFIG_SMP */ 1278#endif /* CONFIG_SMP */
1284 if (old_state == TASK_UNINTERRUPTIBLE) { 1279 if (old_state == TASK_UNINTERRUPTIBLE) {
@@ -1360,12 +1355,9 @@ void fastcall sched_fork(task_t *p, int clone_flags)
1360#ifdef CONFIG_SCHEDSTATS 1355#ifdef CONFIG_SCHEDSTATS
1361 memset(&p->sched_info, 0, sizeof(p->sched_info)); 1356 memset(&p->sched_info, 0, sizeof(p->sched_info));
1362#endif 1357#endif
1363#if defined(CONFIG_SMP) 1358#if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
1364 p->last_waker_cpu = cpu;
1365#if defined(__ARCH_WANT_UNLOCKED_CTXSW)
1366 p->oncpu = 0; 1359 p->oncpu = 0;
1367#endif 1360#endif
1368#endif
1369#ifdef CONFIG_PREEMPT 1361#ifdef CONFIG_PREEMPT
1370 /* Want to start with kernel preemption disabled. */ 1362 /* Want to start with kernel preemption disabled. */
1371 task_thread_info(p)->preempt_count = 1; 1363 task_thread_info(p)->preempt_count = 1;