Skip to content

Commit

Permalink
rcu: permit discontiguous cpu_possible_mask CPU numbering
Browse files Browse the repository at this point in the history
TREE_RCU assumes that CPU numbering is contiguous, but some users need
large holes in the numbering to better map to hardware layout.  This patch
makes TREE_RCU (and TREE_PREEMPT_RCU) tolerate large holes in the CPU
numbering.  However, NR_CPUS must still be greater than the largest
CPU number.

Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
paulmck committed May 10, 2010
1 parent 4300aa6 commit 4a90a06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ static void __init rcu_init_one(struct rcu_state *rsp)

rnp = rsp->level[NUM_RCU_LVLS - 1];
for_each_possible_cpu(i) {
if (i > rnp->grphi)
while (i > rnp->grphi)
rnp++;
rsp->rda[i]->mynode = rnp;
rcu_boot_init_percpu_data(i, rsp);
Expand Down

0 comments on commit 4a90a06

Please sign in to comment.