Thread (26 messages) flat view 26 messages, 9 authors, 2016-11-26

Re: [RFC PATCH v8 1/9] Restartable sequences system call

From: Josh Triplett <hidden>
Date: 2016-08-19 20:49:46
Also in: lkml

On Fri, Aug 19, 2016 at 01:23:57PM -0700, Linus Torvalds wrote:
On Fri, Aug 19, 2016 at 1:07 PM, Mathieu Desnoyers
[off-list ref] wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help