diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2020-08-06 16:35:08 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-08-24 18:40:26 -0700 |
commit | 1a2f5d57a33f7b9189b6b3e997eb858301482d79 (patch) | |
tree | aeb7f1d0474aeb4b82ea1dd1fe4d0df3cc1f7bf1 /kernel/livepatch/state.c | |
parent | 44bad5b3cca2d452d17ef82841b20b42a2cf11a0 (diff) |
rcu: Attempt QS when CPU discovers GP for strict GPs
A given CPU normally notes a new grace period during one RCU_SOFTIRQ,
but avoids reporting the corresponding quiescent state until some later
RCU_SOFTIRQ. This leisurly approach improves efficiency by increasing
the number of update requests served by each grace period, but is not
what is needed for kernels built with CONFIG_RCU_STRICT_GRACE_PERIOD=y.
This commit therefore adds a new rcu_strict_gp_check_qs() function
which, in CONFIG_RCU_STRICT_GRACE_PERIOD=y kernels, simply enters and
immediately exist an RCU read-side critical section. If the CPU is
in a quiescent state, the rcu_read_unlock() will attempt to report an
immediate quiescent state. This rcu_strict_gp_check_qs() function is
invoked from note_gp_changes(), so that a CPU just noticing a new grace
period might immediately report a quiescent state for that grace period.
Reported-by Jann Horn <jannh@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/livepatch/state.c')
0 files changed, 0 insertions, 0 deletions