OSDN Git Service

srcu: Remove srcu_queue_delayed_work_on()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 11 Dec 2018 11:12:38 +0000 (12:12 +0100)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Fri, 25 Jan 2019 23:36:42 +0000 (15:36 -0800)
commite81baf4cb19a9b428ba477fd0423f81672a58817
treefd518df0bf3f31968c4541ff488f0c727cc1b2b2
parentc8ca1aa774b20f182733d1661f3b6aa3105338e7
srcu: Remove srcu_queue_delayed_work_on()

srcu_queue_delayed_work_on() disables preemption (and therefore CPU
hotplug in RCU's case) and then checks based on its own accounting if a
CPU is online. If the CPU is online it uses queue_delayed_work_on()
otherwise it fallbacks to queue_delayed_work().
The problem here is that queue_work() on -RT does not work with disabled
preemption.

queue_work_on() works also on an offlined CPU. queue_delayed_work_on()
has the problem that it is possible to program a timer on an offlined
CPU. This timer will fire once the CPU is online again. But until then,
the timer remains programmed and nothing will happen.

Add a local timer which will fire (as requested per delay) on the local
CPU and then enqueue the work on the specific CPU.

RCUtorture testing with SRCU-P for 24h showed no problems.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
include/linux/srcutree.h
kernel/rcu/srcutree.c
kernel/rcu/tree.c
kernel/rcu/tree.h