rseq: Extend struct rseq with per-memory-map concurrency ID
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 22 Nov 2022 20:39:10 +0000 (15:39 -0500)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 27 Dec 2022 11:52:12 +0000 (12:52 +0100)
commitf7b01bb0b57f994a44ea6368536b59062b796381
treeb5e315e3661c3c74156b4136d6133dae3b741e8d
parentaf7f588d8f7355bc4298dd1962d7826358fc95f0
rseq: Extend struct rseq with per-memory-map concurrency ID

If a memory map has fewer threads than there are cores on the system, or
is limited to run on few cores concurrently through sched affinity or
cgroup cpusets, the concurrency IDs will be values close to 0, thus
allowing efficient use of user-space memory for per-cpu data structures.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221122203932.231377-9-mathieu.desnoyers@efficios.com
include/uapi/linux/rseq.h
kernel/rseq.c