rcu/tree: Keep kfree_rcu() awake during lock contention
authorJoel Fernandes (Google) <joel@joelfernandes.org>
Mon, 25 May 2020 21:47:45 +0000 (23:47 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 29 Jun 2020 18:59:25 +0000 (11:59 -0700)
commit8ac88f7177c75bf9b7b8c29a8054115e1c712baf
tree49803fba70f7e84937ea981982f899b4a3d17e1b
parent8e11690d2f5a9823d66f68918c3986b4e9e160ab
rcu/tree: Keep kfree_rcu() awake during lock contention

On PREEMPT_RT kernels, the krcp spinlock gets converted to an rt-mutex
and causes kfree_rcu() callers to sleep. This makes it unusable for
callers in purely atomic sections such as non-threaded IRQ handlers and
raw spinlock sections. Fix it by converting the spinlock to a raw
spinlock.

Vetting all code paths, there is no reason to believe that the raw
spinlock will hurt RT latencies as it is not held for a long time.

Cc: bigeasy@linutronix.de
Cc: Uladzislau Rezki <urezki@gmail.com>
Reviewed-by: Uladzislau Rezki <urezki@gmail.com>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c