diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2020-05-27 22:11:14 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-05-28 10:31:09 +0200 |
commit | cfa6705d89b6562f79c40c249f8d94073c4276e4 (patch) | |
tree | 5279a46bfde01387460f5f23756435c7ad8a2a2f /mm | |
parent | locking: Introduce local_lock() (diff) | |
download | linux-cfa6705d89b6562f79c40c249f8d94073c4276e4.tar.xz linux-cfa6705d89b6562f79c40c249f8d94073c4276e4.zip |
radix-tree: Use local_lock for protection
The radix-tree and idr preload mechanisms use preempt_disable() to protect
the complete operation between xxx_preload() and xxx_preload_end().
As the code inside the preempt disabled section acquires regular spinlocks,
which are converted to 'sleeping' spinlocks on a PREEMPT_RT kernel and
eventually calls into a memory allocator, this conflicts with the RT
semantics.
Convert it to a local_lock which allows RT kernels to substitute them with
a real per CPU lock. On non RT kernels this maps to preempt_disable() as
before, but provides also lockdep coverage of the critical region.
No functional change.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20200527201119.1692513-3-bigeasy@linutronix.de
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions