Questions and comments about restartable sequences

Torvald Riegel triegel@redhat.com
Sat Nov 21 15:23:00 GMT 2015


On Fri, 2015-11-20 at 14:59 +0000, Szabolcs Nagy wrote:
> On 20/11/15 14:23, Florian Weimer wrote:
> > On 11/20/2015 03:20 PM, Torvald Riegel wrote:
> >> Hi Paul,
> >>
> >> I have a few questions regarding restartable sequences, regarding
> >> userspace.  I don't read LKML, so sorry if I missed something already
> >> said elsewhere.  I'm doing concurrency stuff in glibc, so that's the
> >> perspective of the following questions.  I'd like to see something like
> >> the restartable sequences being offered, and would try to contribute to
> >> the userspace side of this.
> >
> > Torvald,
> >
> > would you please provide some background references for the benefit of
> > the libc-alpha audience?
> >
> 
> https://lkml.org/lkml/2015/10/27/1095

Yes, and the LWN article by Jonathan.  Sorry if that wasn't clear.  I
first wanted to write an email to just Paul, but then figured that I
could as well share it with libc-alpha.  Maybe I should have CCed LKML
as well.

> per cpu critical section that can be restarted
> on interrupt or scheduling events.
> 
> but i don't know how this can be provided
> in libc (or is it for libc internal things?
> per cpu malloc?)

I think glibc might be a useful place to offer a somewhat higher-level
interface for such a feature.  Also, I think that if this turns out to
be only a single sequence per process, glibc might be a mediator for use
by several libraries or such.

glibc would probably also be a user.  malloc is an obvious candidate.
Other candidates might be high-contention paths of non-process-shared
synchronization primitives, which could use this to speed up per-CPU
synchronization before doing process-wide synchronization or something
like that.



More information about the Libc-alpha mailing list