[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180614122759.GB8798@amd>
Date: Thu, 14 Jun 2018 14:27:59 +0200
From: Pavel Machek <pavel@....cz>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Florian Weimer <fweimer@...hat.com>, carlos <carlos@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Boqun Feng <boqun.feng@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel <linux-kernel@...r.kernel.org>,
libc-alpha <libc-alpha@...rceware.org>
Subject: Re: Restartable Sequences system call merged into Linux
On Tue 2018-06-12 12:31:24, Mathieu Desnoyers wrote:
> ----- On Jun 12, 2018, at 9:11 AM, Florian Weimer fweimer@...hat.com wrote:
>
> > On 06/11/2018 10:04 PM, Mathieu Desnoyers wrote:
> >> ----- On Jun 11, 2018, at 3:55 PM, Florian Weimer fweimer@...hat.com wrote:
> >>
> >>> On 06/11/2018 09:49 PM, Mathieu Desnoyers wrote:
> >>>> It should be noted that there can be only one rseq TLS area registered per
> >>>> thread,
> >>>> which can then be used by many libraries and by the executable, so this is a
> >>>> process-wide (per-thread) resource that we need to manage carefully.
> >>>
> >>> Is it possible to resize the area after thread creation, perhaps even
> >>> from other threads?
> >>
> >> I'm not sure why we would want to resize it. The per-thread area is fixed-size.
> >> Its layout is here: include/uapi/linux/rseq.h: struct rseq
> >
> > Looks I was mistaken and this is very similar to the robust mutex list.
> >
> > Should we treat it the same way? Always allocate it for each new thread
> > and register it with the kernel?
>
> That would be an efficient way to do it, indeed. There is very little
> performance overhead to have rseq registered for all threads, whether or
> not they intend to run rseq critical sections.
People with slow / low memory machines would prefer not to see
overhead they don't need...
> I have a few possible approaches in mind (feel free to suggest other
> options):
>
> A) glibc exposes a strong __rseq_abi TLS symbol:
>
> - should ideally *not* be global-dynamic for performance reasons,
> - registration to kernel can either be handled explicitly by requiring
> application or libraries to call an API, or implicitly at thread
> creation,
...so I'd prefer explicit API call.
> B) librseq.so exposes a strong __rseq_abi symbol:
Works for me.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists