[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrXiyFRT_Fqvq2jMpUAWzJ2h9hcAAuGVe4ekFXb5_Z5NEg@mail.gmail.com>
Date: Wed, 3 Aug 2016 22:01:20 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Christoph Lameter <cl@...ux.com>
Cc: Ben Maurer <bmaurer@...com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Russell King <linux@....linux.org.uk>,
linux-api <linux-api@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Michael Kerrisk <mtk.manpages@...il.com>,
Dave Watson <davejwatson@...com>,
rostedt <rostedt@...dmis.org>, Will Deacon <will.deacon@....com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Andi Kleen <andi@...stfloor.org>,
Josh Triplett <josh@...htriplett.org>,
Paul Turner <pjt@...gle.com>,
Boqun Feng <boqun.feng@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Catalin Marinas <catalin.marinas@....com>,
Andrew Hunter <ahh@...gle.com>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [RFC PATCH v7 1/7] Restartable sequences system call
On Aug 3, 2016 11:31 AM, "Christoph Lameter" <cl@...ux.com> wrote:
>
> On Wed, 3 Aug 2016, Andy Lutomirski wrote:
>
> > > Well, a CMPXCHG without LOCK prefix isn't all that expensive on x86.
> > >
> > > It is however on PPC and possibly other architectures, so in name of
> > > simplicity supporting only the one variant makes sense.
> > >
> >
> > I wouldn't want to depend on CMPXCHG. But imagine we had primitives
> > that were narrower than the full abort-on-preemption primitive.
> > Specifically, suppose we had abort if (actual cpu != expected_cpu ||
> > *aptr != aval). We could do things like:
> >
>
> The latency issues that are addressed by restartable sequences require
> minimim instruction overhead. Lockless CMPXCHG is very important in that
> area and I would not simply remove it from consideration.
What I mean is: I think the solution shouldn't depend on the
x86-specific unlocked CMPXCHG instruction if it can be avoided.
Powered by blists - more mailing lists