Re: RFC: Ideal Adaptive Spinning Conditions

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter W. Morreale
Date: Wednesday, March 31, 2010 - 5:17 pm

On Wed, 2010-03-31 at 19:38 -0400, Steven Rostedt wrote:

Right.  This was *critical* for the adaptive rtmutex.   Note in the RT
patch, everybody spins as long as the current owner is on CPU.   

FWIW, IIRC, Solaris has a heuristic approach where incoming tasks spin
for a period of time before going to sleep.  (Cray UINCOS did the same) 


nod.  The entire premise was based on the fact that we were converting
spinlocks, which by definition were short held locks.  What I found
during early development was that the sleep/wakeup cycle was more
intrusive for RT than spinning.  

IIRC, I measured something like 380k context switches/second prior to
the adaptive patches for a dbench test and we cut this down to somewhere
around 50k, with a corresponding increase in throughput.  (I can't
remember specific numbers any more, it was a while ago... ;-)

When applied to semaphores, the benefit was in the noise range as I
recall..

(dbench was chosen due to the heavy contention on the dcache spinlock) 


Best,
-PWM




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

Messages in current thread:
RFC: Ideal Adaptive Spinning Conditions, Darren Hart, (Wed Mar 31, 4:21 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Roland Dreier, (Wed Mar 31, 4:35 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Steven Rostedt, (Wed Mar 31, 4:38 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Peter W. Morreale, (Wed Mar 31, 5:17 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Darren Hart, (Wed Mar 31, 7:03 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Darren Hart, (Wed Mar 31, 7:10 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Darren Hart, (Wed Mar 31, 7:13 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Darren Hart, (Wed Mar 31, 7:25 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Steven Rostedt, (Wed Mar 31, 7:25 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Darren Hart, (Wed Mar 31, 10:15 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Gregory Haskins, (Thu Apr 1, 5:46 am)
Re: RFC: Ideal Adaptive Spinning Conditions, Chris Mason, (Thu Apr 1, 7:04 am)
Re: RFC: Ideal Adaptive Spinning Conditions, Avi Kivity, (Thu Apr 1, 7:20 am)
Re: RFC: Ideal Adaptive Spinning Conditions, Darren Hart, (Thu Apr 1, 8:54 am)
Re: RFC: Ideal Adaptive Spinning Conditions, Avi Kivity, (Thu Apr 1, 9:10 am)
Re: RFC: Ideal Adaptive Spinning Conditions, Chris Wright, (Thu Apr 1, 10:02 am)
Re: RFC: Ideal Adaptive Spinning Conditions, Darren Hart, (Thu Apr 1, 10:10 am)
Re: RFC: Ideal Adaptive Spinning Conditions, Avi Kivity, (Thu Apr 1, 10:15 am)
Re: RFC: Ideal Adaptive Spinning Conditions, john cooper, (Sat Apr 3, 10:51 am)
Re: RFC: Ideal Adaptive Spinning Conditions, john cooper, (Sat Apr 3, 11:00 am)
Re: RFC: Ideal Adaptive Spinning Conditions, Rik van Riel, (Sat Apr 3, 6:50 pm)
Re: RFC: Ideal Adaptive Spinning Conditions, Peter W. Morreale, (Sun Apr 4, 8:06 am)
Re: RFC: Ideal Adaptive Spinning Conditions, Darren Hart, (Mon Apr 5, 7:06 am)
Re: RFC: Ideal Adaptive Spinning Conditions, Darren Hart, (Mon Apr 5, 7:10 am)