Re: [PATCH 1/2 v5] rseq/membarrier: add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ

2020-08-31 Thread Peter Oskolkov
On Mon, Aug 31, 2020 at 8:35 AM Mathieu Desnoyers wrote: > Thanks for the review! > > - On Aug 26, 2020, at 7:02 PM, Peter Oskolkov p...@google.com wrote: > [...] > > > > static void ipi_mb(void *info) > > { > > +#ifdef CONFIG_RSEQ > > + int *flags = info; > > + > > + if (flags && (*

Re: [PATCH 1/2 v5] rseq/membarrier: add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ

2020-08-31 Thread Mathieu Desnoyers
- On Aug 26, 2020, at 7:02 PM, Peter Oskolkov p...@google.com wrote: [...] > > static void ipi_mb(void *info) > { > +#ifdef CONFIG_RSEQ > + int *flags = info; > + > + if (flags && (*flags == MEMBARRIER_FLAG_RSEQ)) > + rseq_preempt(current); > +#endif Please lift this in

[PATCH 1/2 v5] rseq/membarrier: add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ

2020-08-26 Thread Peter Oskolkov
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