rcu: Create call_rcu_tasks() kthread at boot time
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 11 Aug 2017 19:37:07 +0000 (12:37 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 9 Oct 2017 21:24:14 +0000 (14:24 -0700)
commitc63eb17ff06dbcf73e771b9b425c531cc0a9c17b
tree3a985b57593a3ce64503837b9b55ae99e03483ad
parent135bd1a230bb69a68c9808a7d25467318900b80a
rcu: Create call_rcu_tasks() kthread at boot time

Currently the call_rcu_tasks() kthread is created upon first
invocation of call_rcu_tasks().  This has the advantage of avoiding
creation if there are never any invocations of call_rcu_tasks() and of
synchronize_rcu_tasks(), but it requires an unreliable heuristic to
determine when it is safe to create the kthread.  For example, it is
not safe to create the kthread when call_rcu_tasks() is invoked with
a spinlock held, but there is no good way to detect this in !PREEMPT
kernels.

This commit therefore creates this kthread unconditionally at
core_initcall() time.  If you don't want this kthread created, then
build with CONFIG_TASKS_RCU=n.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/update.c