diff options
| author | Mike Galbraith <[email protected]> | 2020-05-27 20:11:19 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2020-05-28 08:31:10 +0000 |
| commit | 19f545b6e07f753c4dc639c2f0ab52345733b6a8 (patch) | |
| tree | 0280ea9f67d39a48f67716bf9fdf4d3554c93cf4 /tools/perf/scripts/python/syscall-counts.py | |
| parent | zram: Allocate struct zcomp_strm as per-CPU memory (diff) | |
| download | kernel-19f545b6e07f753c4dc639c2f0ab52345733b6a8.tar.gz kernel-19f545b6e07f753c4dc639c2f0ab52345733b6a8.zip | |
zram: Use local lock to protect per-CPU data
The zcomp driver uses per-CPU compression. The per-CPU data pointer is
acquired with get_cpu_ptr() which implicitly disables preemption.
It allocates memory inside the preempt disabled region which conflicts
with the PREEMPT_RT semantics.
Replace the implicit preemption control with an explicit local lock.
This allows RT kernels to substitute it with a real per CPU lock, which
serializes the access but keeps the code section preemptible. On non RT
kernels this maps to preempt_disable() as before, i.e. no functional
change.
[bigeasy: Use local_lock(), description, drop reordering]
Signed-off-by: Mike Galbraith <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions
