OSDN Git Service

rcu: Execute RCU reader shortly after rcu_core for strict GPs
authorPaul E. McKenney <paulmck@kernel.org>
Sat, 8 Aug 2020 14:56:31 +0000 (07:56 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 25 Aug 2020 01:40:27 +0000 (18:40 -0700)
commita657f2617010ae237db5693f875968c28e8f732f
treea4cf1d4ed7377d6829cfc0c1a968ce9b093d5607
parent3d29aaf1ef992b5b4612fe32b9e6f517f7bba904
rcu: Execute RCU reader shortly after rcu_core for strict GPs

A kernel built with CONFIG_RCU_STRICT_GRACE_PERIOD=y needs a quiescent
state to appear very shortly after a CPU has noticed a new grace period.
Placing an RCU reader immediately after this point is ineffective because
this normally happens in softirq context, which acts as a big RCU reader.
This commit therefore introduces a new per-CPU work_struct, which is
used at the end of rcu_core() processing to schedule an RCU read-side
critical section from within a clean environment.

Reported-by Jann Horn <jannh@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c
kernel/rcu/tree.h