lkml.org 
[lkml]   [2006]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Use uname not sysctl to get the kernel revision
Eric W. Biederman wrote:
>>>
>> It depends greatly; if a lock is likely to get released by the user after a few
>> memory accesses, spinning is likely to be a win.
>
> But this requires that the lock be short lived, and highly contended.
>

Correct, and incorrect, in that order.

The contention level of the lock determines how likely you are to fail
to acquire it immediately, not how long it takes until it can be
acquired *after you know a failure has already happened.*

> If the lock is not short lived then the release is like to be a long
> ways off. If the lock is not highly contended then you are not likely
> to hit the window when someone else as the contended lock.

The last sentence makes no sense either grammatically or technically.
Sorry.

> How frequent are highly contended short lived locks in user space?

Short-lived locks (which may be significantly contended) are very common
to protect data structures.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-13 00:35    [W:0.073 / U:3.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site