Skip to content

Array-based RCU removals for 4.2

Paul E. McKenney lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mce: Stop using array-index-based RCU primitivesarch/x86/kernel/cpu/mcheck/mce.c+7 -42 replies
2/4rcu: Eliminate array-index-based RCU primitivesinclude/linux/rcupdate.h+0 -502 replies
3/4documentation: RCU-protected array indexes no longer supportedDocumentation/RCU/arrayRCU.txt Documentation/RCU/lockdep.txt Documentation/RCU/rcu_dereference.txt +1 more+28 -370 replies
4/4mce: mce_chrdev_write() can be staticarch/x86/kernel/cpu/mcheck/mce.c+2 -20 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchBorislav Petkov
1/4A-b
2/4A-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH tip/core/rcu 0/4] Array-based RCU removals for 4.2

Hello!

This series removes the sole use of RCU-protected array indexes. It turns out that this use is in x86 code, so smp_load_acquire() works just as well, and this allows removing a troublesome aspect of the RCU API. This removal should in turn allow compilers to better grok RCU dependency chains. For example, expressions like (x-x), (x*0), and (x%1) can result in valid array indexes, but cannot produce valid pointers.

1. Make x86's MCE code use smp_load_acuire() and READ_ONCE() in
place of the RCU API members intended to handle RCU-protected array indexes.

2. Eliminates the RCU API members supporting RCU-protected array
indexes, namely rcu_access_index() and rcu_dereference_index_check().

3. Updates the RCU documentation to reflect #2 above.

4. Makes one of the modified functions be static, courtesy of
Fengguang Wu.

Thanx, Paul

------------------------------------------------------------------------

 b/Documentation/RCU/arrayRCU.txt        |   20 ++++++++++--
 b/Documentation/RCU/lockdep.txt         |   10 ------
 b/Documentation/RCU/rcu_dereference.txt |   33 +++++++--------------
 b/Documentation/RCU/whatisRCU.txt       |    2 -
 b/arch/x86/kernel/cpu/mcheck/mce.c      |   15 +++++----
 b/include/linux/rcupdate.h              |   50 --------------------------------
 6 files changed, 37 insertions(+), 93 deletions(-)