Skip to content

Commit

Permalink
rcu: Exclude RCU-offline CPUs from expedited grace periods
Browse files Browse the repository at this point in the history
The expedited RCU grace periods currently rely on a failure indication
from smp_call_function_single() to determine that a given CPU is offline.
This works after a fashion, but is more contorted and less precise than
relying on RCU's internal state.  This commit therefore takes a first
step towards relying on internal state.

Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
paulmck committed Aug 22, 2016
1 parent 24a6cff commit 98834b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/rcu/tree_exp.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ static void sync_rcu_exp_select_cpus(struct rcu_state *rsp,
struct rcu_dynticks *rdtp = &per_cpu(rcu_dynticks, cpu);

if (raw_smp_processor_id() == cpu ||
!(atomic_add_return(0, &rdtp->dynticks) & 0x1))
!(atomic_add_return(0, &rdtp->dynticks) & 0x1) ||
!(rnp->qsmaskinitnext & rdp->grpmask))
mask_ofl_test |= rdp->grpmask;
}
mask_ofl_ipi = rnp->expmask & ~mask_ofl_test;
Expand Down

0 comments on commit 98834b8

Please sign in to comment.