[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1772818221.34575.1513281428902.JavaMail.zimbra@efficios.com>
Date: Thu, 14 Dec 2017 19:57:08 +0000 (UTC)
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Chris Lameter <cl@...ux.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Boqun Feng <boqun.feng@...il.com>,
Andy Lutomirski <luto@...capital.net>,
Dave Watson <davejwatson@...com>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-api <linux-api@...r.kernel.org>,
Paul Turner <pjt@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Russell King <linux@....linux.org.uk>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Andrew Hunter <ahh@...gle.com>,
Andi Kleen <andi@...stfloor.org>, Ben Maurer <bmaurer@...com>,
rostedt <rostedt@...dmis.org>,
Josh Triplett <josh@...htriplett.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Michael Kerrisk <mtk.manpages@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [RFC PATCH for 4.16 02/21] rseq: Introduce restartable
sequences system call (v12)
----- On Dec 14, 2017, at 2:48 PM, Peter Zijlstra peterz@...radead.org wrote:
> On Thu, Dec 14, 2017 at 12:50:13PM -0600, Christopher Lameter wrote:
>> Ultimately I wish fast increments like done by this_cpu_inc() could be
>> implemented in an efficient way on non x86 platforms that do not have
>> cheap instructions like that.
>
> So the problem isn't migration; for that we could wrap the operation in
> preempt_disable() which is not more expensive than rseq would be. And a
> lot more deterministic.
>
> The problem instead is interrupts, which can result in nested load-store
> operations, and that comes apart. This then means having to disable
> interrupts over these things and _that_ is expensive.
Then could we consider checking a per task-struct rseq_cs pointer when
returning from interrupt handler ? This rseq_cs pointer would track
kernel restartable sequences. This would also work for NMI handlers.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Powered by blists - more mailing lists