srcu: Make Tiny SRCU explicitly disable preemption
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 15 Feb 2024 17:04:30 +0000 (09:04 -0800)
committerUladzislau Rezki (Sony) <urezki@gmail.com>
Mon, 15 Apr 2024 09:29:48 +0000 (11:29 +0200)
commit65b4a59557f6fb5d4355093ad5a2c1bd5598ee41
tree31a5e70e4a09cfb69d4752364a9ab58297ba4134
parentc1ec7c158090ab968ab9022a9f67e7d88d66ee61
srcu: Make Tiny SRCU explicitly disable preemption

Because Tiny SRCU is used only in kernels built with either
CONFIG_PREEMPT_NONE=y or CONFIG_PREEMPT_VOLUNTARY=y, there has not
been any need for TINY SRCU to explicitly disable preemption.  However,
the prospect of lazy preemption changes that, and the lazy-preemption
patches do result in rcutorture runs finding both too-short grace periods
and grace-period hangs for Tiny SRCU.

This commit therefore adds the needed preempt_disable() and
preempt_enable() calls to Tiny SRCU.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Ankur Arora <ankur.a.arora@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
include/linux/srcutiny.h
kernel/rcu/srcutiny.c