From: "Paul E. McKenney via lttng-dev" <lttng-dev@lists.lttng.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: lttng-dev <lttng-dev@lists.lttng.org>, Olivier Dion <odion@efficios.com>
Subject: Re: CPU affinity behavior of liburcu call-rcu per-cpu worker threads
Date: Fri, 10 Jul 2026 11:57:53 -0700 [thread overview]
Message-ID: <8d48389d-5cf8-46b1-a6da-7738e11e3737@paulmck-laptop> (raw)
In-Reply-To: <b37eebf7-1500-4b41-bb65-074473b35cd9@efficios.com>
On Fri, Jul 10, 2026 at 12:17:39AM -0400, Mathieu Desnoyers wrote:
> On 2026-07-10 00:07, Paul E. McKenney wrote:
> > On Thu, Jul 09, 2026 at 10:56:51PM -0400, Mathieu Desnoyers wrote:
> > > On 2026-07-09 22:53, Paul E. McKenney wrote:
> > > [...]
> > > >
> > > > > And unfortunately, for me, tcmalloc is really not a viable option,
> > > > > because it needs to own the RSEQ area registration, and because glibc
> > > > > cannot use it at the same time as tcmalloc, my benchmarks suffer because
> > > > > glibc has a slower sched_getcpu() implementation.
> > > > >
> > > > > So jemalloc it is. tcmalloc is not usable for me because they don't
> > > > > compose with the rest of the world. I warned the tcmalloc developers
> > > > > many times, but they did not listen. :-(
> > > >
> > > > So an alternative rseq for the rest of us?
> > >
> > > I'm not quite sure I understand. Since there is only one rseq
> > > registration per thread, this means that tcmalloc require their
> > > users to use a GLIBC tunable to disable rseq registration at the
> > > libc level, leaving rseq solely to tcmalloc.
> >
> > Could an independent thing very closely resembling rseq be brought into
> > being alongside the current rseq, so that tcmalloc gets the existing
> > one and everyone else plays nice and shares the new one?
>
> That would unfortunately roll the clock backward about 5 years in terms
> of glibc integration, which supports rseq out of the box since version
> 2.35 (Feb 2022).
>
> Moreover, if we add a second rseq area, this means the kernel now need
> to have code to support both areas in key performance-critical code
> areas (scheduler, interrupt entry/exit).
>
> So no, as far as I am concerned, this is really not an option.
>
> The "simpler" option would be to implement the rseq extension tcmalloc
> need, so they can finally stop doing their odd games and become
> compatible with the rest of the world. But the last time I offered to
> help them on this front I've been told that they would not even have
> time to try my patches.
>
> Oh well.
I bet that there is a way, but thus far I at least add a load and a branch
to those fastpaths. Maybe convince someone to submit the needed patches
to tcmalloc() and then browbeat the tcmalloc() folks into accepting them?
You would need someone young, energetic, and obnoxious, which lets me
off on two of the three. ;-)
Thanx, Paul
next prev parent reply other threads:[~2026-07-10 18:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 18:48 Mathieu Desnoyers via lttng-dev
2026-07-09 20:00 ` Mathieu Desnoyers via lttng-dev
2026-07-09 21:45 ` Paul E. McKenney via lttng-dev
2026-07-09 22:01 ` Mathieu Desnoyers via lttng-dev
2026-07-09 23:13 ` Paul E. McKenney via lttng-dev
2026-07-09 23:31 ` Mathieu Desnoyers via lttng-dev
2026-07-10 2:53 ` Paul E. McKenney via lttng-dev
2026-07-10 2:56 ` Mathieu Desnoyers via lttng-dev
2026-07-10 4:07 ` Paul E. McKenney via lttng-dev
2026-07-10 4:17 ` Mathieu Desnoyers via lttng-dev
2026-07-10 18:57 ` Paul E. McKenney via lttng-dev [this message]
2026-07-11 13:52 ` Mathieu Desnoyers via lttng-dev
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=8d48389d-5cf8-46b1-a6da-7738e11e3737@paulmck-laptop \
--to=lttng-dev@lists.lttng.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=odion@efficios.com \
--cc=paulmck@kernel.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