Messages in this thread | | | Subject | Re: [PATCH] rtmutex: ensure only the top waiter or higher priority task can take the lock and reduce unrelated boosting | From | Steven Rostedt <> | Date | Thu, 16 Dec 2010 08:56:32 -0500 |
| |
On Thu, 2010-12-16 at 09:14 +0800, Lai Jiangshan wrote:
> It has called try_to_take_rt_mutex() in __rt_mutex_slowlock(), > when timeout or got signal, it returns from __rt_mutex_slowlock() > with lock->wait_lock still held, and then calls remove_waiter(), > > so we don't need to call try_to_take_rt_mutex() in remove_waiter(). > It is strange that remove_waiter() do some "require lock" work.
Hmm yeah, I need to remember all the details here. There were so many corner cases that had to be dealt with, but we have also modified/simplified the code over time (hopefully your patch will add to the simplification) that my worries may no longer exist, and the code in -rt (needed for spinlock -> mutex) may have legacy code there too.
I'll spend more time analyzing this and make sure we in deed do not need to worry about races between wakeups and lock releasing.
Thanks,
-- Steve
| |