diff options
author | Peter Oskolkov <posk@google.com> | 2020-09-23 16:36:16 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-09-25 14:23:27 +0200 |
commit | 2a36ab717e8fe678d98f81c14a0b124712719840 (patch) | |
tree | a4956fc970342eb2853b9e739009058504290676 /lib/usercopy.c | |
parent | 233e7aca4c8a2c764f556bba9644c36154017e7f (diff) | |
download | linux-2a36ab717e8fe678d98f81c14a0b124712719840.tar.bz2 |
rseq/membarrier: Add MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ
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.
Signed-off-by: Peter Oskolkov <posk@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lkml.kernel.org/r/20200923233618.2572849-1-posk@google.com
Diffstat (limited to 'lib/usercopy.c')
0 files changed, 0 insertions, 0 deletions