Re: [PATCH] sched: remove unreliable pointer inmutex_spin_on_owner()

From: Steven Rostedt
Date: Mon Jun 13 2011 - 09:15:07 EST


On Sat, 2011-06-11 at 22:37 +0800, Hillf Danton wrote:

> Unlike spinner and owner that are well considered, there are waiters, please
> see the following homework.
>
> Another question about CONFIG_MUTEX_SPIN_ON_OWNER, from the view angle of
> spinners, as you mentioned above, looks like that they are crowding on a bus
> as violently as they could, in contrast to the Japanese people in earthquake.
>
> Then the result could be, out of our image, not as optimistic as it is, since
> a thread of lower priority could out-compete another of higher priority,
> when a bunch of spinners are simultaneously trying hard to acquire the mutex,
> though only one is allowed to get award.

Note, we don't care about priorities here. If you care about that, then
use the -rt patched kernel and enable "PREEMPT_RT". Because that changes
the mutex code to be priority driven (uses rt_mutex instead of mutex).
In a year or two (or three ;) the -rt patch will be part of the kernel
and you will be able to get these things for free.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/