From: Josh Triplett <josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org>
To: Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: Mathieu Desnoyers
<mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>,
Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
"Paul E. McKenney"
<paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
Boqun Feng <boqun.feng-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>,
Dave Watson <davejwatson-b10kYP2dOMg@public.gmane.org>,
Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux API <linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Paul Turner <pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
Andrew Hunter <ahh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>,
Chris Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>,
Ben Maurer <bmaurer-b10kYP2dOMg@public.gmane.org>,
Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>,
Catalin Marinas <catalin.marinas@arm>
Subject: Re: [RFC PATCH v8 1/9] Restartable sequences system call
Date: Fri, 19 Aug 2016 13:44:50 -0700 [thread overview]
Message-ID: <20160819204450.GB27677@cloud> (raw)
In-Reply-To: <CA+55aFz+Q33m1+ju3ANaznBwYCcWo9D9WDr2=p0YLEF4gJF12g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Fri, Aug 19, 2016 at 01:23:57PM -0700, Linus Torvalds wrote:
> On Fri, Aug 19, 2016 at 1:07 PM, Mathieu Desnoyers
> <mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org> wrote:
> >
> > Benchmarking various approaches for reading the current CPU number:
>
> So I'd like to see the benchmarks of something that actually *does* something.
>
> IOW, what's the bigger-picture "this is what it actually is useful
> for, and how it speeds things up".
>
> Nobody gets a cpu number just to get a cpu number - it's not a useful
> thing to benchmark. What does getcpu() so much that we care?
The combination of CPU number and restartable sequence allows userspace
to write "per-CPU" rather than "per-thread" algorithms, just as the
kernel can. The kernel can do that with preempt_disable(). Userspace
can do it with "tell me my CPU and restart me if preempted".
But yes, this needs a benchmark of, for instance, urcu implemented on
top of this, or some concrete data structure.
WARNING: multiple messages have this Message-ID (diff)
From: Josh Triplett <josh@joshtriplett.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Peter Zijlstra <peterz@infradead.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Boqun Feng <boqun.feng@gmail.com>,
Andy Lutomirski <luto@amacapital.net>,
Dave Watson <davejwatson@fb.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux API <linux-api@vger.kernel.org>,
Paul Turner <pjt@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Russell King <linux@arm.linux.org.uk>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Andrew Hunter <ahh@google.com>, Andi Kleen <andi@firstfloor.org>,
Chris Lameter <cl@linux.com>, Ben Maurer <bmaurer@fb.com>,
Steven Rostedt <rostedt@goodmis.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Michael Kerrisk <mtk.manpages@gmail.com>
Subject: Re: [RFC PATCH v8 1/9] Restartable sequences system call
Date: Fri, 19 Aug 2016 13:44:50 -0700 [thread overview]
Message-ID: <20160819204450.GB27677@cloud> (raw)
In-Reply-To: <CA+55aFz+Q33m1+ju3ANaznBwYCcWo9D9WDr2=p0YLEF4gJF12g@mail.gmail.com>
On Fri, Aug 19, 2016 at 01:23:57PM -0700, Linus Torvalds wrote:
> On Fri, Aug 19, 2016 at 1:07 PM, Mathieu Desnoyers
> <mathieu.desnoyers@efficios.com> wrote:
> >
> > Benchmarking various approaches for reading the current CPU number:
>
> So I'd like to see the benchmarks of something that actually *does* something.
>
> IOW, what's the bigger-picture "this is what it actually is useful
> for, and how it speeds things up".
>
> Nobody gets a cpu number just to get a cpu number - it's not a useful
> thing to benchmark. What does getcpu() so much that we care?
The combination of CPU number and restartable sequence allows userspace
to write "per-CPU" rather than "per-thread" algorithms, just as the
kernel can. The kernel can do that with preempt_disable(). Userspace
can do it with "tell me my CPU and restart me if preempted".
But yes, this needs a benchmark of, for instance, urcu implemented on
top of this, or some concrete data structure.
next prev parent reply other threads:[~2016-08-19 20:44 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 20:07 [RFC PATCH v8 0/9] Restartable sequences system call Mathieu Desnoyers
2016-08-19 20:07 ` Mathieu Desnoyers
[not found] ` <1471637274-13583-1-git-send-email-mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2016-08-19 20:07 ` [RFC PATCH v8 1/9] " Mathieu Desnoyers
2016-08-19 20:07 ` Mathieu Desnoyers
[not found] ` <1471637274-13583-2-git-send-email-mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2016-08-19 20:23 ` Linus Torvalds
2016-08-19 20:23 ` Linus Torvalds
[not found] ` <CA+55aFz+Q33m1+ju3ANaznBwYCcWo9D9WDr2=p0YLEF4gJF12g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-19 20:44 ` Josh Triplett [this message]
2016-08-19 20:44 ` Josh Triplett
2016-08-19 20:59 ` Linus Torvalds
2016-08-19 20:59 ` Linus Torvalds
2016-08-19 20:56 ` Andi Kleen
2016-08-19 20:56 ` Andi Kleen
[not found] ` <20160819205611.GF5871-1g7Xle2YJi4/4alezvVtWx2eb7JE58TQ@public.gmane.org>
2016-08-19 21:19 ` Paul E. McKenney
2016-08-19 21:19 ` Paul E. McKenney
[not found] ` <20160819211946.GJ3482-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2016-08-19 21:32 ` Linus Torvalds
2016-08-19 21:32 ` Linus Torvalds
2016-08-19 23:35 ` Paul E. McKenney
2016-08-19 23:35 ` Paul E. McKenney
2016-08-19 21:24 ` Josh Triplett
2016-08-19 21:24 ` Josh Triplett
2016-08-19 22:59 ` Dave Watson
2016-08-19 22:59 ` Dave Watson
2016-08-25 17:08 ` Mathieu Desnoyers
2016-08-25 17:08 ` Mathieu Desnoyers
[not found] ` <545371402.19191.1472144912215.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2016-08-25 17:56 ` Ben Maurer
2016-08-25 17:56 ` Ben Maurer
2016-08-27 4:22 ` Josh Triplett
2016-08-27 4:22 ` Josh Triplett
2016-08-29 15:16 ` Mathieu Desnoyers
2016-08-29 15:16 ` Mathieu Desnoyers
[not found] ` <91715400.22162.1472483812389.JavaMail.zimbra-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org>
2016-08-29 16:10 ` Josh Triplett
2016-08-29 16:10 ` Josh Triplett
2016-08-30 2:01 ` Boqun Feng
2016-08-30 2:01 ` Boqun Feng
2016-08-27 12:21 ` Pavel Machek
2016-08-27 12:21 ` Pavel Machek
2016-08-19 20:07 ` [RFC PATCH v8 2/9] tracing: instrument restartable sequences Mathieu Desnoyers
2016-08-19 20:07 ` Mathieu Desnoyers
2016-08-19 20:07 ` [RFC PATCH v8 3/9] Restartable sequences: ARM 32 architecture support Mathieu Desnoyers
2016-08-19 20:07 ` Mathieu Desnoyers
2016-08-19 20:07 ` [RFC PATCH v8 4/9] Restartable sequences: wire up ARM 32 system call Mathieu Desnoyers
2016-08-19 20:07 ` Mathieu Desnoyers
2016-08-19 20:07 ` [RFC PATCH v8 5/9] Restartable sequences: x86 32/64 architecture support Mathieu Desnoyers
2016-08-19 20:07 ` Mathieu Desnoyers
2016-08-19 20:07 ` [RFC PATCH v8 6/9] Restartable sequences: wire up x86 32/64 system call Mathieu Desnoyers
2016-08-19 20:07 ` [RFC PATCH v8 7/9] Restartable sequences: powerpc architecture support Mathieu Desnoyers
2016-08-19 20:07 ` [RFC PATCH v8 8/9] Restartable sequences: Wire up powerpc system call Mathieu Desnoyers
2016-08-19 20:07 ` [RFC PATCH v8 9/9] Restartable sequences: self-tests Mathieu Desnoyers
-- strict thread matches above, loose matches on Subject: below --
2016-11-26 23:43 [RFC PATCH v8 1/9] Restartable sequences system call Paul Turner
2016-11-26 23:43 ` Paul Turner
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=20160819204450.GB27677@cloud \
--to=josh-iaamlnmf4umaiuxdjuqwma@public.gmane.org \
--cc=ahh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org \
--cc=bmaurer-b10kYP2dOMg@public.gmane.org \
--cc=boqun.feng-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=catalin.marinas@arm \
--cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
--cc=davejwatson-b10kYP2dOMg@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
--cc=mathieu.desnoyers-vg+e7yoeK/dWk0Htik3J/w@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=pjt-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.