diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2022-08-25 19:41:24 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2022-09-19 15:35:07 +0300 |
commit | 555bb4ccd1dd78d0263eae31629fe1fdd65c1fb5 (patch) | |
tree | 88891b9221198fa70d63dc7be7cfa38aa1475318 /mm/vmstat.c | |
parent | 521a547ced6477c54b4b0cc206000406c221b4d6 (diff) | |
download | linux-555bb4ccd1dd78d0263eae31629fe1fdd65c1fb5.tar.xz |
preempt: Provide preempt_[dis|en]able_nested()
On PREEMPT_RT enabled kernels, spinlocks and rwlocks are neither disabling
preemption nor interrupts. Though there are a few places which depend on
the implicit preemption/interrupt disable of those locks, e.g. seqcount
write sections, per CPU statistics updates etc.
To avoid sprinkling CONFIG_PREEMPT_RT conditionals all over the place, add
preempt_disable_nested() and preempt_enable_nested() which should be
descriptive enough.
Add a lockdep assertion for the !PREEMPT_RT case to catch callers which
do not have preemption disabled.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220825164131.402717-2-bigeasy@linutronix.de
Diffstat (limited to 'mm/vmstat.c')
0 files changed, 0 insertions, 0 deletions