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: Tuesday, January 4, 2011 - 10:15 am

On Tue, 2011-01-04 at 10:47 -0500, Steven Rostedt wrote:

My bad.  I thought preemption did change task state.

This still requires the owner to run through try_to_wake_up() and all
its associated overhead only to find out that the waiter is running.  

The assumption I made when I suggested the original concept to Greg was
that if the new owner is running, there is *nothing* to do wrt
scheduling.  If that was a wrong assumption, then, yes, drop the patch
and clean things up.  

If that was a good assumption, then we are leaving 'cycles on the table'
as waking up a running process is a non-zero-overhead path and that is a
bad thing considering how many times spin_unlock() is called on an rt
system.

Bear in mind that this savings scales directly as the number of CPUs
(assuming all are vectored on the lock).  We can only have nr_cpus-1
spinning waiters at any given time, regardless of the number of tasks in
contention.  Perhaps this is too little to worry about on a 4way system,
but I suspect that it could be substantial on larger systems.  

I'll be quiet now as I know little about the intricacies of
preemption/scheduling (obviously) and like Greg, have been removed from
RT kernel work for several years. <sigh>

-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)