Re: [PATCH v8 1/3] rseq/membarrier: add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ

From: Peter Zijlstra
Date: Thu Sep 24 2020 - 10:00:33 EST


On Thu, Sep 24, 2020 at 09:51:43AM -0400, Mathieu Desnoyers wrote:
>
>
> ----- On Sep 23, 2020, at 7:36 PM, Peter Oskolkov posk@xxxxxxxxxx wrote:
>
> > This patchset is based on Google-internal RSEQ
> > work done by Paul Turner and Andrew Hunter.
> >
> > When working with per-CPU RSEQ-based memory allocations,
> > it is sometimes important to make sure that a global
> > memory location is no longer accessed from RSEQ critical
> > sections. For example, there can be two per-CPU lists,
> > one is "active" and accessed per-CPU, while another one
> > is inactive and worked on asynchronously "off CPU" (e.g.
> > garbage collection is performed). Then at some point
> > the two lists are swapped, and a fast RCU-like mechanism
> > is required to make sure that the previously active
> > list is no longer accessed.
> >
> > This patch introduces such a mechanism: in short,
> > membarrier() syscall issues an IPI to a CPU, restarting
> > a potentially active RSEQ critical section on the CPU.
> >
>
> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>

Thanks!, I've queued them in:

git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core

please double check the Subject/Changelog edits I made. Once all the
robots are green, I'll push out the lot to -tip.