[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ilvstia9.fsf@oldenburg.str.redhat.com>
Date: Mon, 13 Dec 2021 20:29:50 +0100
From: Florian Weimer <fweimer@...hat.com>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: linux-api <linux-api@...r.kernel.org>,
Jann Horn <jannh@...gle.com>,
libc-alpha <libc-alpha@...rceware.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
paulmck <paulmck@...nel.org>
Subject: Re: rseq + membarrier programming model
* Mathieu Desnoyers:
>> Could it fall back to
>> MEMBARRIER_CMD_GLOBAL instead?
>
> No. CMD_GLOBAL does not issue the required rseq fence used by the
> algorithm discussed. Also, CMD_GLOBAL has quite a few other shortcomings:
> it takes a while to execute, and is incompatible with nohz_full kernels.
What about using sched_setcpu to move the current thread to the same CPU
(and move it back afterwards)? Surely that implies the required sort of
rseq barrier that MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ with
MEMBARRIER_CMD_FLAG_CPU performs?
That is possible even without membarrier, so I wonder why registration
of intent is needed for MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ.
> In order to make sure the programming model is the same for expedited
> private/global plain/sync-core/rseq membarrier commands, we require that
> each process perform a registration beforehand.
Hmm. At least it's not possible to unregister again.
But I think it would be really useful to have some of these barriers
available without registration, possibly in a more expensive form.
Thanks,
Florian
Powered by blists - more mailing lists