[lkml]   [2008]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH [RT] 08/14] add a loop counter based timeout mechanism
On Fri, 2008-02-22 at 11:43 -0800, Paul E. McKenney wrote:
> The fixed-time spins are very useful in cases where the critical section
> is almost always very short but can sometimes be very long. In such
> cases, you would want to spin until either ownership changes or it is
> apparent that the current critical-section instance will be long.

This is what the adaptive patch set does. All current spinners exit the
loop on an owner change.

In this case each "spinner" will traverse the outer rt lock loop and
re-attempt to acquire the lock. If unsuccessful, the task will re-enter
the adaptive wait loop again, providing that there are still "timeout"
iterations left for that particular task.

I do have some stats on the rt lock/adaptive algorithm from a crude
patch used during development. As Bill has noted, the correct way to
obtain these would be to extend lockstats. It was just more expedient
to create this crude patch at the time. If it is helpful to look at
these results in the meantime, I can easily make them, as well as the
patch, available.


 \ /
  Last update: 2008-02-22 21:19    [W:0.090 / U:5.476 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site