PowerPC fastpaths for mutex subsystem
Ingo Molnar
mingo at elte.hu
Wed Jan 11 21:52:13 EST 2006
* Ingo Molnar <mingo at elte.hu> wrote:
> ok. I'll really need to look at "vmstat" output from these. We could
> easily make the mutex slowpath behave like ppc64 semaphores, via the
> attached (untested) patch, but i really think it's the wrong thing to
> do, because it overloads the system with runnable tasks in an
> essentially unlimited fashion [== overscheduling] - they'll all
> contend for the same single mutex.
find the working patch below. (the previous one had a syntax error)
Ingo
Index: linux/kernel/mutex.c
===================================================================
--- linux.orig/kernel/mutex.c
+++ linux/kernel/mutex.c
@@ -227,6 +227,9 @@ __mutex_unlock_slowpath(atomic_t *lock_c
debug_mutex_wake_waiter(lock, waiter);
wake_up_process(waiter->task);
+
+ /* be (much) more agressive about wakeups: */
+ list_move_tail(&waiter->list, &lock->wait_list);
}
debug_mutex_clear_owner(lock);
More information about the Linuxppc64-dev
mailing list