Thread (35 messages) 35 messages, 3 authors, 2018-02-12

Re: [RFC PATCH for 4.16 02/21] rseq: Introduce restartable sequences system call (v12)

From: Mathieu Desnoyers <hidden>
Date: 2017-12-14 19:54:58
Also in: lkml

----- On Dec 14, 2017, at 2:48 PM, Peter Zijlstra peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org wrote:
On Thu, Dec 14, 2017 at 12:50:13PM -0600, Christopher Lameter wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help