[lkml]   [2010]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH V2 0/6][RFC] futex: FUTEX_LOCK with optional adaptive spinning
    On Tue, 2010-04-06 at 07:47 -0700, Ulrich Drepper wrote:
    > On Tue, Apr 6, 2010 at 01:48, Peter Zijlstra <>
    > wrote:
    > > try
    > > spin
    > > try
    > > syscall
    > This is available for a long time in the mutex implementation
    > (PTHREAD_MUTEX_ADAPTIVE_NP mutex type). It hasn't show much
    > improvement if any. There were some people demanding this support for
    > as far as I know they are not using it now. This is adaptive
    > spinning, learning from previous calls how long to wait. But it's
    > still unguided. There is no way to get information like "the owner
    > has been descheduled".

    That's where the FUTEX_LOCK thing comes in, it does all those, the above
    was a single spin loop to amortize the syscall overhead.

    I wouldn't make it any more complex than a single pause ins, syscalls
    are terribly cheap these days.

     \ /
      Last update: 2010-04-06 16:53    [W:0.021 / U:14.884 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site