Re: [PATCH] rtmutex: ensure only the top waiter or higher priority task can take the lock and reduce unrelated boosting

Steven Rostedt
2011-01-10T12:57:38Z

On Mon, 2011-01-10 at 19:37 +0800, Lai Jiangshan wrote:

> After this patch applied, the topwaiter will not be deququed when the lock
> is released(any waiter is dequeued only when it really get the lock or give up).
> So the wait list will not be empty if someone is still waiting on.
>
> I thought, in this code, this->task is waiting, so rt_mutex_next_owner()
> will not return NULL. As you found, my thought is wrong, we should just
> change the comment.

Yes, I've done that. I'll be posting my new port of your patch today
which has passed all my tests. I'm still looking to see what I can do
with the adaptive spinlocks, as I'm hitting a "hung task" when running
dbench 100 in a loop. But I just hit that same "hung task" with vanilla
2.6.33 (no -rt), so I think the bug is not with my code ;-)

-- Steve