[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180502084328.GE12180@hirez.programming.kicks-ass.net>
Date: Wed, 2 May 2018 10:43:28 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Daniel Colascione <dancol@...gle.com>
Cc: mathieu.desnoyers@...icios.com, paulmck@...ux.vnet.ibm.com,
boqun.feng@...il.com, luto@...capital.net, davejwatson@...com,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
pjt@...gle.com, Andrew Morton <akpm@...ux-foundation.org>,
linux@....linux.org.uk, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, Andrew Hunter <ahh@...gle.com>, andi@...stfloor.org,
cl@...ux.com, bmaurer@...com, rostedt@...dmis.org,
josh@...htriplett.org, torvalds@...ux-foundation.org,
catalin.marinas@....com, will.deacon@....com,
mtk.manpages@...il.com, Joel Fernandes <joelaf@...gle.com>
Subject: Re: [RFC PATCH for 4.18 00/14] Restartable Sequences
On Wed, May 02, 2018 at 03:53:47AM +0000, Daniel Colascione wrote:
> The usual approach to "better" is an "adaptive mutex". Such a thing, when
> it attempts to acquire a lock another thread owns, spins for some number of
> iterations, then falls back to futex. I guess that's a little better than
> immediately jumping to futex, but it's not optimal. We can still spin when
> the lock owner isn't scheduled, and the spin count is usually some guess
> (either specified manually or estimated statistically) that's not
> guaranteed to produce decent results. Even if we do pick a good spin count,
> we run a very good chance of under- or over-spinning on any given
> lock-acquire. We always want to sleep when spinning would be pointless.
Look for the FUTEX_LOCK patches from Waiman.
Powered by blists - more mailing lists