From: Dave Watson <davejwatson@fb.com>
To: Paul Turner <commonly@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Andrew Hunter <ahh@google.com>,
Andy Lutomirski <luto@amacapital.net>,
Andi Kleen <andi@firstfloor.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
<linux-api@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
Ingo Molnar <mingo@redhat.com>, Chris Lameter <cl@linux.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC PATCH 0/3] restartable sequences v2: fast user-space percpu critical sections
Date: Wed, 28 Oct 2015 07:44:01 -0700 [thread overview]
Message-ID: <20151028144401.GB2994761@devbig217.prn1.facebook.com> (raw)
In-Reply-To: <20151027235635.16059.11630.stgit@pjt-glaptop.roam.corp.google.com>
On 10/27/15 04:56 PM, Paul Turner wrote:
> This series is a new approach which introduces an alternate ABI that does not
> depend on open-coded assembly nor a central 'repository' of rseq sequences.
> Sequences may now be inlined and the preparatory[*] work for the sequence can
> be written in a higher level language.
Very nice, it's definitely much easier to use.
> Exactly, for x86_64 this looks like:
> movq <failed>, rcx [1]
> movq $1f, <commit_instr> [2]
> cmpq <start value>, <current value> [3] (start is in rcx)
> jnz <failed> (4)
> movq <to_write>, (<target>) (5)
> 1: movq $0, <commit_instr>
>
> There has been some related discussion, which I am supportive of, in which
> we use fs/gs instead of TLS. This maps naturally to the above and removes
> the current requirement for per-thread initialization (this is a good thing!).
>
> On debugger interactions:
>
> There are some nice properties about this new style of API which allow it to
> actually support safe interactions with a debugger:
> a) The event counter is a per-cpu value. This means that we can not advance
> it if no threads from the same process execute on that cpu. This
> naturally allows basic single step support with thread-isolation.
I think this means multiple processes would no longer be able to use
per-cpu variables in shared memory, since they would no longer restart
with respect to each other?
> b) Single-step can be augmented to evalute the ABI without incrementing the
> event count.
> c) A debugger can also be augmented to evaluate this ABI and push restarts
> on the kernel's behalf.
>
> This is also compatible with David's approach of not single stepping between
> 2-4 above. However, I think these are ultimately a little stronger since true
> single-stepping and breakpoint support would be available. Which would be
> nice to allow actual debugging of sequences.
next prev parent reply other threads:[~2015-10-28 14:45 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 23:56 Paul Turner
2015-10-27 23:56 ` [RFC PATCH v2 1/3] restartable sequences: user-space per-cpu " Paul Turner
2015-11-19 16:38 ` Johannes Berg
2015-12-11 12:56 ` Mathieu Desnoyers
2015-10-27 23:57 ` [RFC PATCH v2 2/3] restartable sequences: x86 ABI Paul Turner
2015-10-28 5:03 ` Peter Zijlstra
2015-10-28 5:19 ` Paul Turner
2015-12-11 13:30 ` Mathieu Desnoyers
2015-10-27 23:57 ` [RFC PATCH v2 3/3] restartable sequences: basic self-tests Paul Turner
2016-04-05 20:33 ` Mathieu Desnoyers
2016-04-06 7:43 ` Peter Zijlstra
2016-04-06 13:39 ` Mathieu Desnoyers
2016-04-06 19:25 ` Peter Zijlstra
2015-10-28 14:44 ` Dave Watson [this message]
2015-12-11 12:05 ` [RFC PATCH 0/3] restartable sequences v2: fast user-space percpu critical sections Mathieu Desnoyers
2015-12-11 13:39 ` Mathieu Desnoyers
2016-04-06 15:56 ` Andy Lutomirski
2016-04-07 12:02 ` Peter Zijlstra
2016-04-07 14:35 ` Andy Lutomirski
2016-04-07 15:24 ` Peter Zijlstra
2016-04-07 15:39 ` Peter Zijlstra
2016-04-07 15:44 ` Andy Lutomirski
2016-04-07 15:53 ` Peter Zijlstra
2016-04-07 16:43 ` Andy Lutomirski
2016-04-07 20:11 ` Peter Zijlstra
2016-04-07 22:05 ` Andy Lutomirski
2016-04-08 1:11 ` Mathieu Desnoyers
2016-04-08 1:21 ` Andy Lutomirski
2016-04-08 2:05 ` Mathieu Desnoyers
2016-04-08 17:46 ` Mathieu Desnoyers
2016-04-08 21:16 ` Andy Lutomirski
2016-04-08 21:25 ` Linus Torvalds
2016-04-10 14:07 ` Mathieu Desnoyers
2016-04-08 11:02 ` Peter Zijlstra
2016-04-08 15:57 ` Andy Lutomirski
2016-04-08 6:41 ` Peter Zijlstra
2016-04-08 15:58 ` Andy Lutomirski
2016-04-11 21:55 ` Mathieu Desnoyers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151028144401.GB2994761@devbig217.prn1.facebook.com \
--to=davejwatson@fb.com \
--cc=ahh@google.com \
--cc=andi@firstfloor.org \
--cc=cl@linux.com \
--cc=commonly@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome