[PATCH] sched: filter affine wakeups

)

From: Nick Piggin <nickpiggin@yahoo.com.au>

Track the last waker CPU, and only consider wakeup-balancing if there's a
match between current waker CPU and the previous waker CPU.  This ensures
that there is some correlation between two subsequent wakeup events before
we move the task.  Should help random-wakeup workloads on large SMP
systems, by reducing the migration attempts by a factor of nr_cpus.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
akpm@osdl.org
2006-01-12 01:05:32 -08:00
committed by Linus Torvalds
parent 198e2f1811
commit d7102e95b7
2 changed files with 13 additions and 2 deletions

View File

@ -696,8 +696,11 @@ struct task_struct {
int lock_depth; /* BKL lock depth */
#if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
#if defined(CONFIG_SMP)
int last_waker_cpu; /* CPU that last woke this task up */
#if defined(__ARCH_WANT_UNLOCKED_CTXSW)
int oncpu;
#endif
#endif
int prio, static_prio;
struct list_head run_list;