Skip to content

RFC rcu: Introduce leaf_node_for_each_mask_possible_cpu() and its friend

Boqun Feng lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5rcu: Introduce primitives to iterate mask bits in an RCU leaf nodekernel/rcu/tree.h+30 -00 replies
2/5rcu: Use leaf_node_for_each_mask_possible_cpu() in RCU stall checkingkernel/rcu/tree.c+12 -110 replies
3/5rcu: Use leaf_node_for_each_mask_possible_cpu() for ->expmask iterationkernel/rcu/tree_exp.h+5 -120 replies
4/5rcu: Use leaf_node_for_each_mask_possible_cpu() in force_qs_rnp()kernel/rcu/tree.c+6 -70 replies
5/5rcu: Use leaf_node_for_each_mask_*() for leaf node online CPU iterationkernel/rcu/tree_plugin.h+5 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/5] rcu: Introduce leaf_node_for_each_mask_possible_cpu() and its friend

Hi Paul,

While reading the discussion at:

https://marc.info/?l=linux-kernel&m=148044253400769

I figured we might use this fact to save some extra checks in RCU core code, currently we iterate over all the possible CPUs on a leaf node, check whether they were masked in a certain mask and do something. However, given the fact that the masks on a leaf node should always be sparse than the corresponding part of cpu_possible_mask, we'd better iterate over all bits in a mask and check whether the corresponding CPU is possible or not.

So I made this RFC, I did a simple build/boot/rcutorture test on my box with SMP=4, nothing bad happens. Currently I'm waiting for the 0day and trying to test this one a bigger system, in the meanwhile, looking forwards to any comment and suggestion.

So thoughts?

Regards,
Boqun