Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock wakeup

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter W. Morreale
Date: Friday, December 24, 2010 - 8:47 am

On Thu, 2010-12-23 at 21:45 -0700, Gregory Haskins wrote:

We shouldn't be too quick to merely rip this out without a little
thinking.  Clearly this is broken, however the intent was clear.  

That being that if a waiter is spinning, we don't need to wake it up. 

The wake up path is substantially more than a barrier; it includes a
barrier as well as grabbing the task_rq_lock only to find that the task
is oncpu. Then various accounting is updated, etc. 

We know definitively that a waiter can only spin if the owner is oncpu,
by definition of adaptive spinning.  We also know that only the owner
can release the lock to a waiter (spinning or not).   So it seems clear
that avoiding unnecessary contention on the rq lock would be a Good
Thing(tm). 

Perhaps this cannot be done safely, but if you saw an improvement in
dbench by merely removing a barrier, imagine the improvement by removing
the contention on the lock.

Happy Holidays to all!

-PWM


 



--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][RT][PATCH 0/4] rtmutex: Simplify PI code, Steven Rostedt, (Thu Dec 23, 3:47 pm)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ..., Peter W. Morreale, (Fri Dec 24, 8:47 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ..., Peter W. Morreale, (Tue Jan 4, 8:19 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ..., Peter W. Morreale, (Tue Jan 4, 10:15 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ..., Peter W. Morreale, (Tue Jan 4, 10:24 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ..., Peter W. Morreale, (Tue Jan 4, 10:45 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ..., Peter W. Morreale, (Tue Jan 4, 1:48 pm)