Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1650839 > unrolled thread
| Started by | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| First post | 2017-05-26 00:00 +0200 |
| Last post | 2017-05-26 00:30 +0200 |
| Articles | 20 on this page of 90 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH tip/core/rcu 0/88] Commits for 4.13 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:00 +0200
[PATCH tip/core/rcu 55/88] rcu: Eliminate the unused __rcu_is_watching() function "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 30/88] srcu: Document auto-expediting requirement "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 49/88] rcu: Move docbook comments out of rcupdate.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 60/88] rcu: Move rcu_ftrace_dump() from rcupdate.h to rcu.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 57/88] rcu: Remove linux/debugobjects.h from rcupdate.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 34/88] rcu: Update rcu_bootup_announce_oddness() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 13/88] rcu: Remove obsolete reference to synchronize_kernel() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 08/88] rcutorture: Update test scenarios based on new Kconfig dependencies "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 54/88] rcu: Move rcupdate.h to new empty-function style "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 24/88] rcutorture: Reduce CPUs dedicated to testing Classic SRCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 77/88] rcu: Remove #ifdef moving rcu_end_inkernel_boot from rcupdate.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 78/88] rcu: Remove typecheck() from RCU locking wrapper functions "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 70/88] rcu: Refactor #includes from include/linux/rcupdate.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 36/88] srcu: Print non-default exp_holdoff values at boot time "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 01/88] rcutorture: Add lockdep to one of the SRCU scenarios "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 51/88] rcu: Move expediting-related access/control out of rcupdate.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 61/88] rcu: move rcupdate.h to the new true/false-function style "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 66/88] srcu: Prevent sdp->srcu_gp_seq_needed counter wrap "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 71/88] rcu: Convert rnp->lock wrappers to macros for SRCU use "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 52/88] rcu: Move torture-related definitions from rcupdate.h to rcu.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 58/88] rcu: Improve __call_rcu() debug-objects error message "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 73/88] srcu: Use rnp->lock wrappers to replace explicit memory barriers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 45/88] rcu: Add memory barriers for NOCB leader wakeup "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 62/88] rcu: Move torture-related functions out of rcutiny.h and rcutree.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:10 +0200
[PATCH tip/core/rcu 23/88] srcu: Make Classic and Tree SRCU announce themselves at bootup "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 38/88] rcu: Add lockdep_assert_held() teeth to tree_plugin.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 43/88] sched: Rely on synchronize_rcu_mult() de-duplication "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 67/88] srcu: Shrink srcu.h by moving docbook and private function "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 56/88] rcu: Move the RCU_SCHEDULER_ definitions from rcupdate.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 32/88] rcu: Add preemptibility checks in rcu_sched_qs() and rcu_bh_qs() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 16/88] rcu: Make sync_rcu_preempt_exp_done() return bool "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 39/88] srcu: Make SRCU be once again optional "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 26/88] rcuperf: Set more user-friendly defaults "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 10/88] rcu: Complain if blocking in preemptible RCU read-side critical section "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 84/88] rcu: Eliminate NOCBs CPU-state Kconfig options "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 04/88] rcutorture: Add a scenario for Tiny SRCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 80/88] rcu: Remove SPARSE_RCU_POINTER Kconfig option "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 12/88] rcuperf: Remove conflicting Kconfig options "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 47/88] rcu: Flag need for rcu_node_tree.h and rcu_segcblist.h visibility "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 79/88] rcu: Remove the now-obsolete PROVE_RCU_REPEATEDLY Kconfig option "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 25/88] srcu: Shrink Tiny SRCU a bit more "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 75/88] rcu: Remove the RCU_KTHREAD_PRIO Kconfig option "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 85/88] rcu: Move RCU non-debug Kconfig options to kernel/rcu "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 65/88] rcu: move rcutiny.h to the new true/false-function style "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 74/88] rcu: Remove *_SLOW_* Kconfig options "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 86/88] rcu: Move RCU debug Kconfig options to kernel/rcu "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 63/88] rcu: Move rcu_request_urgent_qs_task() out of rcutiny.h and rcutree.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 42/88] rcu: Make synchronize_rcu_mult() check for duplicates "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 48/88] rcutorture: Don't wait for kernel when all builds fail "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 82/88] srcu: Remove Classic SRCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 76/88] rcu: Remove nohz_full full-system-idle state machine "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
Re: [PATCH tip/core/rcu 76/88] rcu: Remove nohz_full full-system-idle state machine Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-26 01:10 +0200
Re: [PATCH tip/core/rcu 76/88] rcu: Remove nohz_full full-system-idle state machine "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 01:50 +0200
[PATCH tip/core/rcu 07/88] rcutorture: Correctly handle CONFIG_RCU_TORTURE_TEST_* options "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 40/88] srcu: Shrink Tiny SRCU a bit "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 50/88] rcu: Move rcu_expedited and rcu_normal externs from rcupdate.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 87/88] rcu: Remove event tracing from Tiny RCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 53/88] rcu: Remove UINT_CMP_GE() and UINT_CMP_LT() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 27/88] srcu-cbmc: Use /usr/bin/awk instead of /bin/awk "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 72/88] rcu: Move rnp->lock wrappers for SRCU use "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 44/88] rcu: Use RCU_NOCB_WAKE rather than RCU_NOGP_WAKE "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 68/88] srcu: Apply trivial callback lists to shrink Tiny SRCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 41/88] srcu: Add DEBUG_OBJECTS_RCU_HEAD functionality "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 28/88] rcuperf: Add writer_holdoff boot parameter "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 59/88] rcu: Move rcu_is_nocb_cpu() from rcupdate.h to rcu.h "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 69/88] lockdep: Use consistent printing primitives "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 31/88] doc: Take tail recursion into account in RCU requirements "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 46/88] torture: Add --kconfig argument to kvm.sh "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 18/88] rcuperf: Add test for dynamically initialized srcu_struct "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 22/88] rcuperf: Add the ability to test tiny RCU flavors "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 02/88] rcutorture: Add three-level tree test for Tree SRCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 88/88] rcu: Remove RCU CPU stall warnings from Tiny RCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 03/88] rcutorture: Fix bug in reporting Kconfig mis-settings "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 06/88] rcu: Prevent rcu_barrier() from starting needless grace periods "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 37/88] rcu: Add lockdep_assert_held() teeth to tree.c "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 64/88] rcu: Move rcutiny.h to new empty-function style "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 81/88] srcu: Fix rcutorture-statistics typo "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 20/88] atomics: Add header comment so spin_unlock_wait() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:20 +0200
[PATCH tip/core/rcu 19/88] doc/atomic_ops: Clarify smp_mb__{before,after}_atomic() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
[PATCH tip/core/rcu 21/88] docs: Fix typo in Documentation/memory-barriers.txt "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
[PATCH tip/core/rcu 15/88] rcuperf: Add a Kconfig-fragment file for Classic SRCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
[PATCH tip/core/rcu 35/88] srcu: Make exp_holdoff module parameter be static "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
[PATCH tip/core/rcu 09/88] srcu: Eliminate possibility of destructive counter overflow "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
[PATCH tip/core/rcu 29/88] rcutorture: Add "git diff" output to testid.txt file "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
[PATCH tip/core/rcu 11/88] rcuperf: Defer expedited/normal check to end of test "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
[PATCH tip/core/rcu 17/88] checkpatch: Remove checks for expedited grace periods "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
[PATCH tip/core/rcu 05/88] rcutorture: Add a scenario for Classic SRCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
[PATCH tip/core/rcu 14/88] rcuperf: Add ability to performance-test call_rcu() and friends "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
[PATCH tip/core/rcu 33/88] rcu: Print out rcupdate.c non-default boot-time settings "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-05-26 00:30 +0200
Page 1 of 5 [1] 2 3 4 5 Next page →
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:00 +0200 |
| Subject | [PATCH tip/core/rcu 0/88] Commits for 4.13 |
| Message-ID | <tL8Xv-5iU-1@gated-at.bofh.it> |
Hello!
This rather long series mostly removes unused features, shrinks the
include/linux/rcupdate.h file's .i intermediate-output size, updates
rcutorture testing, and supplies miscellaneous fixes. Branching proved
impractical due to the large footprint of many of the commits, hence the
long linear series. On the other hand, this series's diffstat summary
line is as follows:
87 files changed, 1745 insertions(+), 4389 deletions(-)
That is, there is a net removal of more than 2500 lines of code.
The shrinking is near the end of the series, starting with patch 49.
The patches in this series are as follows:
1-5. Adjust rcutorture testing to better cover SRCU.
6. Performance fix that prevents rcu_barrier() from starting
needless grace periods.
7-8. Fix rcutorture bugs that were failing to test certain
Kconfig options in some rcutorture scenarios.
9. Fix a long-standing counter-wrap bug in SRCU.
10. Fix a bug where preemptible RCU would fail to complain about
blocking (as opposed to preemption) within an RCU read-side
critical section.
11-12. Fix argument-checking bug in the rcuperf performance/scalability
checking module and remove conflicting Kconfig options.
13. Remove obsolete references to the long-departed synchronize_kernel()
RCU API member.
14. Upgrade rcuperf so that it can performance-test the asynchronous
call_rcu() primitives.
15. Add a Kconfig-fragment file for Classic SRCU.
16. Make sync_rcu_preempt_exp_done() return bool instead of int.
17. Now that expedited RCU grace periods do not rely on stop-CPUs
mechanisms and don't IPI idle/nohz_full CPUs, remove the
checkpatch.pl warning about them.
18. Add an rcuperf test for dynamically initialized srcu_struct
structures.
19. Clarify atomic_ops.rst definition of smp_mb__{before,after}_atomic().
20. Add header comment to spin_unlock_wait() defining its semantics.
21. Fix typo in memory-barriers.txt, courtesy of Stan Drozd.
22. Add the ability to do rcuperf performance tests on tiny RCU flavors.
23. Make SRCU flavors announce themselves at boot.
24. Reduce the number of CPUs used in Classic SRCU testing.
25. Shrink Tiny SRCU a bit more by rearranging and shrinking fields
in the srcu_struct.
26. Set more user-friendly kernel-boot parameter defaults.
27. Use /usr/bin/awk instead of /bin/awk, courtesy of Priyalee
Kushwaha.
28. Add writer_holdoff boot parameter to rcuperf to test auto-expediting.
29. Add "git diff" output to rcutorture's testid.txt file to
allow exact after-the-fact reconstruction of exactly what
source code was tested.
30. Document SRCU auto-expediting requirement.
31. Add tail-recursion possibility to RCU requirements docuemntation.
32. Make CONFIG_PROVE_LOCKING kernels warn about failure to have
preemption disabled in calls to rcu_sched_qs() and rcu_bh_qs().
33-34. Improve dmesg record of non-default Kconfig and boot-parameter
settings.
35. Make the exp_holdoff module parameter be static.
36. Add dmesg record of non-default auto-expedite holdoff times.
37-38. Add assertions to enforce lock-held and irq-disabled preconditions.
39. Make SRCU again be optional.
40. Inline __srcu_read_lock() to shrink Tiny SRCU.
41. Add DEBUG_OBJECTS_RCU_HEAD checking to SRCU callbacks.
42-43. Make synchronize_rcu_mult() check for duplicates, getting rid
of an ugly #ifdef in sched_cpu_deactivate().
44. Rename the nonsensical RCU_NOGP_WAKE flags to RCU_NOCB_WAKE_.
45. Add memory barriers for NOCB leader wakeup.
46. Add kconfig argument to rcutorture testing to avoid the need
for lots of special-case Kconfig-fragment files.
47. Add comments explaining why rcu_node_tree.h and rcu_segcblist.h
are visible external to the kernel/rcu directory.
48. Fix a bug in rcutorture where it would wait for kernels to
complete running even though all builds failed for that batch.
49-57. Shrink include/linux/rcupdate.h to speed up kernel builds.
58. Improve the __call_rcu() debug-objects error message.
59-65. More shrinking include/linux/rcupdate.h to speed up kernel builds,
including shrinking files included by this file.
66. Prevent sdp->srcu_gp_seq_needed counter wrap.
67. Shrink include/linux/srcu.h (and files it includes) to speed
up kernel builds.
68. Move to trivial callback lists to further shrink Tiny SRCU.
69. Use consistent printing primitives within a given function in
lockdep.c.
70. Refactor #includes from include/linux/rcupdate.h to reduce the
amount of material included, in turn speeding up kernel builds.
71-73. Convert rnp->lock wrappers to macros for SRCU use, thus
consolidating code.
72-80. Remove unused code and options.
81. Fix typo in code generating rcutorture statistics.
82-84. Remove more unused code and options.
85-86. Move RCU Kconfig options to kernel/rcu.
87-88. Remove yet more unused code and options.
Thanx, Paul
------------------------------------------------------------------------
/include/linux/srcuclassic.h | 100 -
/kernel/rcu/srcu.c | 669 ----------
/tools/testing/selftests/rcutorture/configs/rcu/SRCU-C | 11
/tools/testing/selftests/rcutorture/configs/rcuperf/SRCUCLASSIC | 16
Documentation/RCU/trace.txt | 535 -------
b/Documentation/RCU/00-INDEX | 2
b/Documentation/RCU/Design/Requirements/Requirements.html | 34
b/Documentation/RCU/checklist.txt | 8
b/Documentation/admin-guide/kernel-parameters.txt | 41
b/Documentation/core-api/atomic_ops.rst | 5
b/Documentation/dev-tools/sparse.rst | 6
b/Documentation/kernel-per-CPU-kthreads.txt | 31
b/Documentation/memory-barriers.txt | 2
b/Documentation/timers/NO_HZ.txt | 29
b/include/linux/compiler.h | 4
b/include/linux/rcu_node_tree.h | 4
b/include/linux/rcu_segcblist.h | 4
b/include/linux/rcupdate.h | 324 ----
b/include/linux/rcutiny.h | 181 --
b/include/linux/rcutree.h | 21
b/include/linux/spinlock.h | 20
b/include/linux/srcu.h | 29
b/include/linux/srcuclassic.h | 15
b/include/linux/srcutiny.h | 46
b/include/linux/srcutree.h | 13
b/include/trace/events/rcu.h | 1
b/init/Kconfig | 355 -----
b/kernel/locking/lockdep.c | 176 +-
b/kernel/rcu/Kconfig | 244 +++
b/kernel/rcu/Kconfig.debug | 82 +
b/kernel/rcu/Makefile | 2
b/kernel/rcu/rcu.h | 335 ++++-
b/kernel/rcu/rcuperf.c | 129 +
b/kernel/rcu/rcutorture.c | 21
b/kernel/rcu/srcu.c | 7
b/kernel/rcu/srcutiny.c | 85 -
b/kernel/rcu/srcutree.c | 193 +-
b/kernel/rcu/tiny.c | 54
b/kernel/rcu/tiny_plugin.h | 123 -
b/kernel/rcu/tree.c | 195 +-
b/kernel/rcu/tree.h | 151 --
b/kernel/rcu/tree_exp.h | 2
b/kernel/rcu/tree_plugin.h | 603 +--------
b/kernel/rcu/update.c | 77 +
b/kernel/sched/core.c | 8
b/kernel/time/Kconfig | 50
b/lib/Kconfig.debug | 188 --
b/lib/Makefile | 3
b/scripts/checkpatch.pl | 17
b/tools/testing/selftests/rcutorture/bin/config_override.sh | 61
b/tools/testing/selftests/rcutorture/bin/configcheck.sh | 2
b/tools/testing/selftests/rcutorture/bin/kvm-build.sh | 13
b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 62
b/tools/testing/selftests/rcutorture/bin/kvm.sh | 38
b/tools/testing/selftests/rcutorture/configs/rcu/CFLIST | 4
b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-C | 13
b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-C.boot | 1
b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-N | 2
b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P | 6
b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-t | 10
b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-t.boot | 1
b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-u | 9
b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-u.boot | 1
b/tools/testing/selftests/rcutorture/configs/rcu/TINY02 | 5
b/tools/testing/selftests/rcutorture/configs/rcu/TREE01 | 5
b/tools/testing/selftests/rcutorture/configs/rcu/TREE01.boot | 4
b/tools/testing/selftests/rcutorture/configs/rcu/TREE02 | 5
b/tools/testing/selftests/rcutorture/configs/rcu/TREE03 | 4
b/tools/testing/selftests/rcutorture/configs/rcu/TREE03.boot | 4
b/tools/testing/selftests/rcutorture/configs/rcu/TREE04 | 4
b/tools/testing/selftests/rcutorture/configs/rcu/TREE05 | 4
b/tools/testing/selftests/rcutorture/configs/rcu/TREE05.boot | 3
b/tools/testing/selftests/rcutorture/configs/rcu/TREE06 | 4
b/tools/testing/selftests/rcutorture/configs/rcu/TREE06.boot | 3
b/tools/testing/selftests/rcutorture/configs/rcu/TREE07 | 6
b/tools/testing/selftests/rcutorture/configs/rcu/TREE08 | 1
b/tools/testing/selftests/rcutorture/configs/rcu/TREE08.boot | 1
b/tools/testing/selftests/rcutorture/configs/rcuperf/SRCUCLASSIC | 16
b/tools/testing/selftests/rcutorture/configs/rcuperf/TINY | 16
b/tools/testing/selftests/rcutorture/configs/rcuperf/TREE | 1
b/tools/testing/selftests/rcutorture/configs/rcuperf/TREE54 | 1
b/tools/testing/selftests/rcutorture/doc/TINY_RCU.txt | 1
b/tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 34
b/tools/testing/selftests/rcutorture/formal/srcu-cbmc/modify_srcu.awk | 2
kernel/rcu/tree_trace.c | 494 -------
tools/testing/selftests/rcutorture/configs/rcu/TREE02-T | 21
tools/testing/selftests/rcutorture/configs/rcu/TREE08-T | 21
87 files changed, 1745 insertions(+), 4389 deletions(-)
[toc] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 55/88] rcu: Eliminate the unused __rcu_is_watching() function |
| Message-ID | <tL97b-5CD-3@gated-at.bofh.it> |
| In reply to | #1650839 |
The __rcu_is_watching() function is currently not used, aside from
to implement the rcu_is_watching() function. This commit therefore
eliminates __rcu_is_watching(), which has the beneficial side-effect
of shrinking include/linux/rcupdate.h a bit.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcupdate.h | 4 ----
include/linux/rcutiny.h | 11 -----------
kernel/rcu/tiny.c | 13 -------------
kernel/rcu/tree.c | 19 ++++---------------
4 files changed, 4 insertions(+), 43 deletions(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 415633076cb1..b4edfe0966c6 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -204,10 +204,6 @@ do { \
rcu_note_voluntary_context_switch(current); \
} while (0)
-#if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP)
-bool __rcu_is_watching(void);
-#endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) */
-
/*
* Infrastructure to implement the synchronize_() primitives in
* TREE_RCU and rcu_barrier_() primitives in TINY_RCU.
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index ade360e0d58c..5ed6934152a6 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -232,22 +232,11 @@ static inline void rcu_scheduler_starting(void)
}
#endif /* #else #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_SRCU) */
-#if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE)
-
-static inline bool rcu_is_watching(void)
-{
- return __rcu_is_watching();
-}
-
-#else /* defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) */
-
static inline bool rcu_is_watching(void)
{
return true;
}
-#endif /* #else defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) */
-
static inline void rcu_request_urgent_qs_task(struct task_struct *t)
{
}
diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
index e5385731e391..2306cab2195d 100644
--- a/kernel/rcu/tiny.c
+++ b/kernel/rcu/tiny.c
@@ -59,19 +59,6 @@ void rcu_barrier_sched(void)
}
EXPORT_SYMBOL(rcu_barrier_sched);
-#if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE)
-
-/*
- * Test whether RCU thinks that the current CPU is idle.
- */
-bool notrace __rcu_is_watching(void)
-{
- return true;
-}
-EXPORT_SYMBOL(__rcu_is_watching);
-
-#endif /* defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) */
-
/*
* Helper function for rcu_sched_qs() and rcu_bh_qs().
* Also irqs are disabled to avoid confusion due to interrupt handlers
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 5ebc830297c1..61a97164abcc 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1139,22 +1139,11 @@ void rcu_nmi_exit(void)
}
/**
- * __rcu_is_watching - are RCU read-side critical sections safe?
- *
- * Return true if RCU is watching the running CPU, which means that
- * this CPU can safely enter RCU read-side critical sections. Unlike
- * rcu_is_watching(), the caller of __rcu_is_watching() must have at
- * least disabled preemption.
- */
-bool notrace __rcu_is_watching(void)
-{
- return !rcu_dynticks_curr_cpu_in_eqs();
-}
-
-/**
* rcu_is_watching - see if RCU thinks that the current CPU is idle
*
- * If the current CPU is in its idle loop and is neither in an interrupt
+ * Return true if RCU is watching the running CPU, which means that this
+ * CPU can safely enter RCU read-side critical sections. In other words,
+ * if the current CPU is in its idle loop and is neither in an interrupt
* or NMI handler, return true.
*/
bool notrace rcu_is_watching(void)
@@ -1162,7 +1151,7 @@ bool notrace rcu_is_watching(void)
bool ret;
preempt_disable_notrace();
- ret = __rcu_is_watching();
+ ret = !rcu_dynticks_curr_cpu_in_eqs();
preempt_enable_notrace();
return ret;
}
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 30/88] srcu: Document auto-expediting requirement |
| Message-ID | <tL97b-5CD-5@gated-at.bofh.it> |
| In reply to | #1650839 |
This commit documents the auto-expediting requirement satisfied by
commits 2da4b2a7fd8d ("srcu: Expedite first synchronize_srcu() when idle")
and 22607d66bbc3 ("srcu: Specify auto-expedite holdoff time").
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
Documentation/RCU/Design/Requirements/Requirements.html | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/Documentation/RCU/Design/Requirements/Requirements.html b/Documentation/RCU/Design/Requirements/Requirements.html
index f60adf112663..8bbf0bb18389 100644
--- a/Documentation/RCU/Design/Requirements/Requirements.html
+++ b/Documentation/RCU/Design/Requirements/Requirements.html
@@ -2936,6 +2936,20 @@ to whether or not a CPU is online, which means that <tt>srcu_barrier()</tt>
need not exclude CPU-hotplug operations.
<p>
+SRCU also differs from other RCU flavors in that SRCU's expedited and
+non-expedited grace periods are implemented by the same mechanism.
+This means that in the current SRCU implementation, expediting a
+future grace period has the side effect of expediting all prior
+grace periods that have not yet completed.
+(But please note that this is a property of the current implementation,
+not necessarily of future implementations.)
+In addition, if SRCU has been idle for longer than the interval
+specified by the <tt>srcutree.exp_holdoff</tt> kernel boot parameter
+(25 microseconds by default),
+and if a <tt>synchronize_srcu()</tt> invocation ends this idle period,
+that invocation will be automatically expedited.
+
+<p>
As of v4.12, SRCU's callbacks are maintained per-CPU, eliminating
a locking bottleneck present in prior kernel versions.
Although this will allow users to put much heavier stress on
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 49/88] rcu: Move docbook comments out of rcupdate.h |
| Message-ID | <tL97b-5CD-7@gated-at.bofh.it> |
| In reply to | #1650839 |
The include/linux/rcupdate.h file is included by more than 200
files, so shrinking it should provide some build-time benefits.
This commit therefore moves several docbook comments from rcupdate.h to
kernel/rcu/update.c, kernel/rcu/tree.c, and kernel/rcu/tree_plugin.h, thus
reducing the number of times that the compiler has to scan these comments.
This likely provides only a small benefit, but every little bit helps.
This commit also fixes a malformed bulleted list noted by the 0day
Test Robot.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcupdate.h | 117 ++---------------------------------------------
kernel/rcu/tree.c | 42 +++++++++++++++--
kernel/rcu/tree_plugin.h | 33 ++++++++++++-
kernel/rcu/update.c | 20 ++++++--
4 files changed, 89 insertions(+), 123 deletions(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 393e461d3ea8..7a206f039fc2 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -140,115 +140,14 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
/* Exported common interfaces */
#ifdef CONFIG_PREEMPT_RCU
-
-/**
- * call_rcu() - Queue an RCU callback for invocation after a grace period.
- * @head: structure to be used for queueing the RCU updates.
- * @func: actual callback function to be invoked after the grace period
- *
- * The callback function will be invoked some time after a full grace
- * period elapses, in other words after all pre-existing RCU read-side
- * critical sections have completed. However, the callback function
- * might well execute concurrently with RCU read-side critical sections
- * that started after call_rcu() was invoked. RCU read-side critical
- * sections are delimited by rcu_read_lock() and rcu_read_unlock(),
- * and may be nested.
- *
- * Note that all CPUs must agree that the grace period extended beyond
- * all pre-existing RCU read-side critical section. On systems with more
- * than one CPU, this means that when "func()" is invoked, each CPU is
- * guaranteed to have executed a full memory barrier since the end of its
- * last RCU read-side critical section whose beginning preceded the call
- * to call_rcu(). It also means that each CPU executing an RCU read-side
- * critical section that continues beyond the start of "func()" must have
- * executed a memory barrier after the call_rcu() but before the beginning
- * of that RCU read-side critical section. Note that these guarantees
- * include CPUs that are offline, idle, or executing in user mode, as
- * well as CPUs that are executing in the kernel.
- *
- * Furthermore, if CPU A invoked call_rcu() and CPU B invoked the
- * resulting RCU callback function "func()", then both CPU A and CPU B are
- * guaranteed to execute a full memory barrier during the time interval
- * between the call to call_rcu() and the invocation of "func()" -- even
- * if CPU A and CPU B are the same CPU (but again only if the system has
- * more than one CPU).
- */
-void call_rcu(struct rcu_head *head,
- rcu_callback_t func);
-
+void call_rcu(struct rcu_head *head, rcu_callback_t func);
#else /* #ifdef CONFIG_PREEMPT_RCU */
-
-/* In classic RCU, call_rcu() is just call_rcu_sched(). */
#define call_rcu call_rcu_sched
-
#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
-/**
- * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period.
- * @head: structure to be used for queueing the RCU updates.
- * @func: actual callback function to be invoked after the grace period
- *
- * The callback function will be invoked some time after a full grace
- * period elapses, in other words after all currently executing RCU
- * read-side critical sections have completed. call_rcu_bh() assumes
- * that the read-side critical sections end on completion of a softirq
- * handler. This means that read-side critical sections in process
- * context must not be interrupted by softirqs. This interface is to be
- * used when most of the read-side critical sections are in softirq context.
- * RCU read-side critical sections are delimited by :
- * - rcu_read_lock() and rcu_read_unlock(), if in interrupt context.
- * OR
- * - rcu_read_lock_bh() and rcu_read_unlock_bh(), if in process context.
- * These may be nested.
- *
- * See the description of call_rcu() for more detailed information on
- * memory ordering guarantees.
- */
-void call_rcu_bh(struct rcu_head *head,
- rcu_callback_t func);
-
-/**
- * call_rcu_sched() - Queue an RCU for invocation after sched grace period.
- * @head: structure to be used for queueing the RCU updates.
- * @func: actual callback function to be invoked after the grace period
- *
- * The callback function will be invoked some time after a full grace
- * period elapses, in other words after all currently executing RCU
- * read-side critical sections have completed. call_rcu_sched() assumes
- * that the read-side critical sections end on enabling of preemption
- * or on voluntary preemption.
- * RCU read-side critical sections are delimited by :
- * - rcu_read_lock_sched() and rcu_read_unlock_sched(),
- * OR
- * anything that disables preemption.
- * These may be nested.
- *
- * See the description of call_rcu() for more detailed information on
- * memory ordering guarantees.
- */
-void call_rcu_sched(struct rcu_head *head,
- rcu_callback_t func);
-
+void call_rcu_bh(struct rcu_head *head, rcu_callback_t func);
+void call_rcu_sched(struct rcu_head *head, rcu_callback_t func);
void synchronize_sched(void);
-
-/**
- * call_rcu_tasks() - Queue an RCU for invocation task-based grace period
- * @head: structure to be used for queueing the RCU updates.
- * @func: actual callback function to be invoked after the grace period
- *
- * The callback function will be invoked some time after a full grace
- * period elapses, in other words after all currently executing RCU
- * read-side critical sections have completed. call_rcu_tasks() assumes
- * that the read-side critical sections end at a voluntary context
- * switch (not a preemption!), entry into idle, or transition to usermode
- * execution. As such, there are no read-side primitives analogous to
- * rcu_read_lock() and rcu_read_unlock() because this primitive is intended
- * to determine that all tasks have passed through a safe state, not so
- * much for data-strcuture synchronization.
- *
- * See the description of call_rcu() for more detailed information on
- * memory ordering guarantees.
- */
void call_rcu_tasks(struct rcu_head *head, rcu_callback_t func);
void synchronize_rcu_tasks(void);
void rcu_barrier_tasks(void);
@@ -474,18 +373,8 @@ extern struct lockdep_map rcu_bh_lock_map;
extern struct lockdep_map rcu_sched_lock_map;
extern struct lockdep_map rcu_callback_map;
int debug_lockdep_rcu_enabled(void);
-
int rcu_read_lock_held(void);
int rcu_read_lock_bh_held(void);
-
-/**
- * rcu_read_lock_sched_held() - might we be in RCU-sched read-side critical section?
- *
- * If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an
- * RCU-sched read-side critical section. In absence of
- * CONFIG_DEBUG_LOCK_ALLOC, this assumes we are in an RCU-sched read-side
- * critical section unless it can prove otherwise.
- */
int rcu_read_lock_sched_held(void);
#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 121c1436a7f3..5ebc830297c1 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3223,8 +3223,24 @@ __call_rcu(struct rcu_head *head, rcu_callback_t func,
local_irq_restore(flags);
}
-/*
- * Queue an RCU-sched callback for invocation after a grace period.
+/**
+ * call_rcu_sched() - Queue an RCU for invocation after sched grace period.
+ * @head: structure to be used for queueing the RCU updates.
+ * @func: actual callback function to be invoked after the grace period
+ *
+ * The callback function will be invoked some time after a full grace
+ * period elapses, in other words after all currently executing RCU
+ * read-side critical sections have completed. call_rcu_sched() assumes
+ * that the read-side critical sections end on enabling of preemption
+ * or on voluntary preemption.
+ * RCU read-side critical sections are delimited by :
+ * - rcu_read_lock_sched() and rcu_read_unlock_sched(), OR
+ * - anything that disables preemption.
+ *
+ * These may be nested.
+ *
+ * See the description of call_rcu() for more detailed information on
+ * memory ordering guarantees.
*/
void call_rcu_sched(struct rcu_head *head, rcu_callback_t func)
{
@@ -3232,8 +3248,26 @@ void call_rcu_sched(struct rcu_head *head, rcu_callback_t func)
}
EXPORT_SYMBOL_GPL(call_rcu_sched);
-/*
- * Queue an RCU callback for invocation after a quicker grace period.
+/**
+ * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period.
+ * @head: structure to be used for queueing the RCU updates.
+ * @func: actual callback function to be invoked after the grace period
+ *
+ * The callback function will be invoked some time after a full grace
+ * period elapses, in other words after all currently executing RCU
+ * read-side critical sections have completed. call_rcu_bh() assumes
+ * that the read-side critical sections end on completion of a softirq
+ * handler. This means that read-side critical sections in process
+ * context must not be interrupted by softirqs. This interface is to be
+ * used when most of the read-side critical sections are in softirq context.
+ * RCU read-side critical sections are delimited by :
+ * - rcu_read_lock() and rcu_read_unlock(), if in interrupt context.
+ * OR
+ * - rcu_read_lock_bh() and rcu_read_unlock_bh(), if in process context.
+ * These may be nested.
+ *
+ * See the description of call_rcu() for more detailed information on
+ * memory ordering guarantees.
*/
void call_rcu_bh(struct rcu_head *head, rcu_callback_t func)
{
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 573fbe9640a0..116cf8339826 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -675,8 +675,37 @@ static void rcu_preempt_do_callbacks(void)
#endif /* #ifdef CONFIG_RCU_BOOST */
-/*
- * Queue a preemptible-RCU callback for invocation after a grace period.
+/**
+ * call_rcu() - Queue an RCU callback for invocation after a grace period.
+ * @head: structure to be used for queueing the RCU updates.
+ * @func: actual callback function to be invoked after the grace period
+ *
+ * The callback function will be invoked some time after a full grace
+ * period elapses, in other words after all pre-existing RCU read-side
+ * critical sections have completed. However, the callback function
+ * might well execute concurrently with RCU read-side critical sections
+ * that started after call_rcu() was invoked. RCU read-side critical
+ * sections are delimited by rcu_read_lock() and rcu_read_unlock(),
+ * and may be nested.
+ *
+ * Note that all CPUs must agree that the grace period extended beyond
+ * all pre-existing RCU read-side critical section. On systems with more
+ * than one CPU, this means that when "func()" is invoked, each CPU is
+ * guaranteed to have executed a full memory barrier since the end of its
+ * last RCU read-side critical section whose beginning preceded the call
+ * to call_rcu(). It also means that each CPU executing an RCU read-side
+ * critical section that continues beyond the start of "func()" must have
+ * executed a memory barrier after the call_rcu() but before the beginning
+ * of that RCU read-side critical section. Note that these guarantees
+ * include CPUs that are offline, idle, or executing in user mode, as
+ * well as CPUs that are executing in the kernel.
+ *
+ * Furthermore, if CPU A invoked call_rcu() and CPU B invoked the
+ * resulting RCU callback function "func()", then both CPU A and CPU B are
+ * guaranteed to execute a full memory barrier during the time interval
+ * between the call to call_rcu() and the invocation of "func()" -- even
+ * if CPU A and CPU B are the same CPU (but again only if the system has
+ * more than one CPU).
*/
void call_rcu(struct rcu_head *head, rcu_callback_t func)
{
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 123a9c4b5055..84dec2c8ad1b 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -576,9 +576,23 @@ module_param(rcu_task_stall_timeout, int, 0644);
static void rcu_spawn_tasks_kthread(void);
static struct task_struct *rcu_tasks_kthread_ptr;
-/*
- * Post an RCU-tasks callback. First call must be from process context
- * after the scheduler if fully operational.
+/**
+ * call_rcu_tasks() - Queue an RCU for invocation task-based grace period
+ * @rhp: structure to be used for queueing the RCU updates.
+ * @func: actual callback function to be invoked after the grace period
+ *
+ * The callback function will be invoked some time after a full grace
+ * period elapses, in other words after all currently executing RCU
+ * read-side critical sections have completed. call_rcu_tasks() assumes
+ * that the read-side critical sections end at a voluntary context
+ * switch (not a preemption!), entry into idle, or transition to usermode
+ * execution. As such, there are no read-side primitives analogous to
+ * rcu_read_lock() and rcu_read_unlock() because this primitive is intended
+ * to determine that all tasks have passed through a safe state, not so
+ * much for data-strcuture synchronization.
+ *
+ * See the description of call_rcu() for more detailed information on
+ * memory ordering guarantees.
*/
void call_rcu_tasks(struct rcu_head *rhp, rcu_callback_t func)
{
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 60/88] rcu: Move rcu_ftrace_dump() from rcupdate.h to rcu.h |
| Message-ID | <tL97b-5CD-11@gated-at.bofh.it> |
| In reply to | #1650839 |
The rcu_ftrace_dump() function is used only internally to RCU. This
commit therefore moves its declaration from include/linux/rcupdate.h
to kernel/rcu/rcu.h.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcupdate.h | 12 ------------
kernel/rcu/rcu.h | 12 ++++++++++++
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 003427425e27..ad5e6934dcf3 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -884,18 +884,6 @@ static inline void rcu_sysidle_force_exit(void) { }
/*
- * Dump the ftrace buffer, but only one time per callsite per boot.
- */
-#define rcu_ftrace_dump(oops_dump_mode) \
-do { \
- static atomic_t ___rfd_beenhere = ATOMIC_INIT(0); \
- \
- if (!atomic_read(&___rfd_beenhere) && \
- !atomic_xchg(&___rfd_beenhere, 1)) \
- ftrace_dump(oops_dump_mode); \
-} while (0)
-
-/*
* Place this after a lock-acquisition primitive to guarantee that
* an UNLOCK+LOCK pair acts as a full barrier. This guarantee applies
* if the UNLOCK and LOCK are executed by the same CPU or if the
diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index 2f344662c568..cdbaa441bdac 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -212,6 +212,18 @@ int rcu_jiffies_till_stall_check(void);
*/
#define TPS(x) tracepoint_string(x)
+/*
+ * Dump the ftrace buffer, but only one time per callsite per boot.
+ */
+#define rcu_ftrace_dump(oops_dump_mode) \
+do { \
+ static atomic_t ___rfd_beenhere = ATOMIC_INIT(0); \
+ \
+ if (!atomic_read(&___rfd_beenhere) && \
+ !atomic_xchg(&___rfd_beenhere, 1)) \
+ ftrace_dump(oops_dump_mode); \
+} while (0)
+
void rcu_early_boot_tests(void);
void rcu_test_sync_prims(void);
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 57/88] rcu: Remove linux/debugobjects.h from rcupdate.h |
| Message-ID | <tL97c-5CD-19@gated-at.bofh.it> |
| In reply to | #1650839 |
The include/linux/rcupdate.h file does not actually need anything from linux/debugobjects.h, so this commit removes the inclusion. Reported-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> --- include/linux/rcupdate.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 9206a28a2d44..f105f0834bbe 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -40,7 +40,6 @@ #include <linux/cpumask.h> #include <linux/seqlock.h> #include <linux/lockdep.h> -#include <linux/debugobjects.h> #include <linux/bug.h> #include <linux/compiler.h> #include <linux/ktime.h> -- 2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 34/88] rcu: Update rcu_bootup_announce_oddness() |
| Message-ID | <tL97c-5CD-17@gated-at.bofh.it> |
| In reply to | #1650839 |
This commit updates rcu_bootup_announce_oddness() to check additional
Kconfig options and module/boot parameters.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcu/tree.c | 9 ++++++---
kernel/rcu/tree_plugin.h | 31 ++++++++++++++++++++++++++++---
2 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index b01a02e7a0b7..ac8dce15fd74 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -536,9 +536,12 @@ void rcu_all_qs(void)
}
EXPORT_SYMBOL_GPL(rcu_all_qs);
-static long blimit = 10; /* Maximum callbacks per rcu_do_batch. */
-static long qhimark = 10000; /* If this many pending, ignore blimit. */
-static long qlowmark = 100; /* Once only this many pending, use blimit. */
+#define DEFAULT_RCU_BLIMIT 10 /* Maximum callbacks per rcu_do_batch. */
+static long blimit = DEFAULT_RCU_BLIMIT;
+#define DEFAULT_RCU_QHIMARK 10000 /* If this many pending, ignore blimit. */
+static long qhimark = DEFAULT_RCU_QHIMARK;
+#define DEFAULT_RCU_QLOMARK 100 /* Once only this many pending, use blimit. */
+static long qlowmark = DEFAULT_RCU_QLOMARK;
module_param(blimit, long, 0444);
module_param(qhimark, long, 0444);
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index eb5ebdce25ff..9cb3dff78b6f 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -79,7 +79,9 @@ static void __init rcu_bootup_announce_oddness(void)
pr_info("\tHierarchical RCU autobalancing is disabled.\n");
if (IS_ENABLED(CONFIG_RCU_FAST_NO_HZ))
pr_info("\tRCU dyntick-idle grace-period acceleration is enabled.\n");
- if (IS_ENABLED(CONFIG_PROVE_RCU))
+ if (IS_ENABLED(CONFIG_PROVE_RCU_REPEATEDLY))
+ pr_info("\tRCU lockdep checking is permanently enabled.\n");
+ else if (IS_ENABLED(CONFIG_PROVE_RCU))
pr_info("\tRCU lockdep checking is enabled.\n");
if (RCU_NUM_LVLS >= 4)
pr_info("\tFour(or more)-level hierarchy is enabled.\n");
@@ -90,8 +92,31 @@ static void __init rcu_bootup_announce_oddness(void)
pr_info("\tBoot-time adjustment of leaf fanout to %d.\n", rcu_fanout_leaf);
if (nr_cpu_ids != NR_CPUS)
pr_info("\tRCU restricting CPUs from NR_CPUS=%d to nr_cpu_ids=%d.\n", NR_CPUS, nr_cpu_ids);
- if (IS_ENABLED(CONFIG_RCU_BOOST))
- pr_info("\tRCU kthread priority: %d.\n", kthread_prio);
+#ifdef CONFIG_RCU_BOOST
+ pr_info("\tRCU priority boosting: priority %d delay %d ms.\n", kthread_prio, CONFIG_RCU_BOOST_DELAY);
+#endif
+ if (blimit != DEFAULT_RCU_BLIMIT)
+ pr_info("\tBoot-time adjustment of callback invocation limit to %ld.\n", blimit);
+ if (qhimark != DEFAULT_RCU_QHIMARK)
+ pr_info("\tBoot-time adjustment of callback high-water mark to %ld.\n", qhimark);
+ if (qlowmark != DEFAULT_RCU_QLOMARK)
+ pr_info("\tBoot-time adjustment of callback low-water mark to %ld.\n", qlowmark);
+ if (jiffies_till_first_fqs != ULONG_MAX)
+ pr_info("\tBoot-time adjustment of first FQS scan delay to %ld jiffies.\n", jiffies_till_first_fqs);
+ if (jiffies_till_next_fqs != ULONG_MAX)
+ pr_info("\tBoot-time adjustment of subsequent FQS scan delay to %ld jiffies.\n", jiffies_till_next_fqs);
+ if (rcu_kick_kthreads)
+ pr_info("\tKick kthreads if too-long grace period.\n");
+ if (IS_ENABLED(CONFIG_DEBUG_OBJECTS_RCU_HEAD))
+ pr_info("\tRCU callback double-/use-after-free debug enabled.\n");
+ if (IS_ENABLED(CONFIG_RCU_TORTURE_TEST_SLOW_PREINIT))
+ pr_info("\tRCU debug GP pre-init slowdown %d jiffies.\n", gp_preinit_delay);
+ if (IS_ENABLED(CONFIG_RCU_TORTURE_TEST_SLOW_INIT))
+ pr_info("\tRCU debug GP init slowdown %d jiffies.\n", gp_init_delay);
+ if (IS_ENABLED(CONFIG_RCU_TORTURE_TEST_SLOW_CLEANUP))
+ pr_info("\tRCU debug GP init slowdown %d jiffies.\n", gp_cleanup_delay);
+ if (IS_ENABLED(CONFIG_RCU_EQS_DEBUG))
+ pr_info("\tRCU debug extended QS entry/exit.\n");
rcupdate_announce_bootup_oddness();
}
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 13/88] rcu: Remove obsolete reference to synchronize_kernel() |
| Message-ID | <tL97c-5CD-23@gated-at.bofh.it> |
| In reply to | #1650839 |
The synchronize_kernel() primitive was removed in favor of
synchronize_sched() more than a decade ago, and it seems likely that
rather few kernel hackers are familiar with it. Its continued presence
is therefore providing more confusion than enlightenment. This commit
therefore removes the reference from the synchronize_sched() header
comment, and adds the corresponding information to the synchronize_rcu(0
header comment.
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcu/tree.c | 6 ------
kernel/rcu/tree_plugin.h | 9 +++++++--
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 9ce682242e99..3bee58fc23b1 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3280,12 +3280,6 @@ static inline int rcu_blocking_is_gp(void)
* to have executed a full memory barrier during the execution of
* synchronize_sched() -- even if CPU A and CPU B are the same CPU (but
* again only if the system has more than one CPU).
- *
- * This primitive provides the guarantees made by the (now removed)
- * synchronize_kernel() API. In contrast, synchronize_rcu() only
- * guarantees that rcu_read_lock() sections will have completed.
- * In "classic RCU", these two guarantees happen to be one and
- * the same, but can differ in realtime RCU implementations.
*/
void synchronize_sched(void)
{
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index a421753e8e9c..3b432fa4c45b 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -664,8 +664,13 @@ EXPORT_SYMBOL_GPL(call_rcu);
* synchronize_rcu() was waiting. RCU read-side critical sections are
* delimited by rcu_read_lock() and rcu_read_unlock(), and may be nested.
*
- * See the description of synchronize_sched() for more detailed information
- * on memory ordering guarantees.
+ * See the description of synchronize_sched() for more detailed
+ * information on memory-ordering guarantees. However, please note
+ * that -only- the memory-ordering guarantees apply. For example,
+ * synchronize_rcu() is -not- guaranteed to wait on things like code
+ * protected by preempt_disable(), instead, synchronize_rcu() is -only-
+ * guaranteed to wait on RCU read-side critical sections, that is, sections
+ * of code protected by rcu_read_lock().
*/
void synchronize_rcu(void)
{
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 08/88] rcutorture: Update test scenarios based on new Kconfig dependencies |
| Message-ID | <tL97c-5CD-25@gated-at.bofh.it> |
| In reply to | #1650839 |
A number of the rcutorture test scenarios were not using the desired Kconfig options because dependencies were preventing the selections in the Kconfig-fragment files from being honored. This commit therefore updates the Kconfig-fragment files to account for these changes in dependencies. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> --- tools/testing/selftests/rcutorture/configs/rcu/TINY02 | 3 ++- tools/testing/selftests/rcutorture/configs/rcu/TREE01 | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE02 | 2 +- tools/testing/selftests/rcutorture/configs/rcu/TREE04 | 1 - tools/testing/selftests/rcutorture/configs/rcu/TREE06 | 1 + tools/testing/selftests/rcutorture/configs/rcu/TREE07 | 2 -- 6 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TINY02 b/tools/testing/selftests/rcutorture/configs/rcu/TINY02 index a59f7686e219..9007cd979df7 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/TINY02 +++ b/tools/testing/selftests/rcutorture/configs/rcu/TINY02 @@ -11,5 +11,6 @@ CONFIG_PROVE_LOCKING=y CONFIG_PROVE_RCU_REPEATEDLY=y #CHECK#CONFIG_PROVE_RCU=y CONFIG_DEBUG_LOCK_ALLOC=y +CONFIG_DEBUG_OBJECTS=y CONFIG_DEBUG_OBJECTS_RCU_HEAD=y -CONFIG_PREEMPT_COUNT=y +CONFIG_DEBUG_ATOMIC_SLEEP=y diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE01 b/tools/testing/selftests/rcutorture/configs/rcu/TREE01 index 359cb258f639..cc6c5815236e 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE01 +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE01 @@ -10,6 +10,7 @@ CONFIG_RCU_FAST_NO_HZ=y CONFIG_RCU_TRACE=y CONFIG_HOTPLUG_CPU=y CONFIG_MAXSMP=y +CONFIG_CPUMASK_OFFSTACK=y CONFIG_RCU_NOCB_CPU=y CONFIG_RCU_NOCB_CPU_ZERO=y CONFIG_DEBUG_LOCK_ALLOC=n diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE02 b/tools/testing/selftests/rcutorture/configs/rcu/TREE02 index c1ab5926568b..1cecab330ba0 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE02 +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE02 @@ -18,9 +18,9 @@ CONFIG_RCU_NOCB_CPU=n CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=n CONFIG_RCU_BOOST=n -CONFIG_DEBUG_OBJECTS_RCU_HEAD=n CONFIG_RCU_EXPERT=y CONFIG_RCU_TORTURE_TEST_SLOW_CLEANUP=y CONFIG_RCU_TORTURE_TEST_SLOW_INIT=y CONFIG_RCU_TORTURE_TEST_SLOW_PREINIT=y +CONFIG_DEBUG_OBJECTS=y CONFIG_DEBUG_OBJECTS_RCU_HEAD=y diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 b/tools/testing/selftests/rcutorture/configs/rcu/TREE04 index 5af758e783c7..851c01ae2cea 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE04 +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE04 @@ -15,7 +15,6 @@ CONFIG_SUSPEND=n CONFIG_HIBERNATION=n CONFIG_RCU_FANOUT=4 CONFIG_RCU_FANOUT_LEAF=3 -CONFIG_RCU_NOCB_CPU=n CONFIG_DEBUG_LOCK_ALLOC=n CONFIG_DEBUG_OBJECTS_RCU_HEAD=n CONFIG_RCU_EXPERT=y diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE06 b/tools/testing/selftests/rcutorture/configs/rcu/TREE06 index 4cb02bd28f08..9215827649bd 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE06 +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE06 @@ -18,6 +18,7 @@ CONFIG_RCU_NOCB_CPU=n CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y #CHECK#CONFIG_PROVE_RCU=y +CONFIG_DEBUG_OBJECTS=y CONFIG_DEBUG_OBJECTS_RCU_HEAD=y CONFIG_RCU_EXPERT=y CONFIG_RCU_TORTURE_TEST_SLOW_CLEANUP=y diff --git a/tools/testing/selftests/rcutorture/configs/rcu/TREE07 b/tools/testing/selftests/rcutorture/configs/rcu/TREE07 index b12a3ea1867e..99f04e4c5162 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/TREE07 +++ b/tools/testing/selftests/rcutorture/configs/rcu/TREE07 @@ -1,6 +1,5 @@ CONFIG_SMP=y CONFIG_NR_CPUS=16 -CONFIG_CPUMASK_OFFSTACK=y CONFIG_PREEMPT_NONE=y CONFIG_PREEMPT_VOLUNTARY=n CONFIG_PREEMPT=n @@ -15,7 +14,6 @@ CONFIG_RCU_TRACE=y CONFIG_HOTPLUG_CPU=y CONFIG_RCU_FANOUT=2 CONFIG_RCU_FANOUT_LEAF=2 -CONFIG_RCU_NOCB_CPU=n CONFIG_DEBUG_LOCK_ALLOC=n CONFIG_DEBUG_OBJECTS_RCU_HEAD=n CONFIG_RCU_EXPERT=y -- 2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 54/88] rcu: Move rcupdate.h to new empty-function style |
| Message-ID | <tL97c-5CD-29@gated-at.bofh.it> |
| In reply to | #1650839 |
This commit saves a few lines in include/linux/rcupdate.h by moving
to single-line definitions for empty functions, instead of the old
style where the two curly braces each get their own line.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcupdate.h | 39 +++++++++------------------------------
1 file changed, 9 insertions(+), 30 deletions(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index fa3f921e5874..415633076cb1 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -124,12 +124,8 @@ static inline void rcu_end_inkernel_boot(void) { }
void rcu_sysrq_start(void);
void rcu_sysrq_end(void);
#else /* #ifdef CONFIG_RCU_STALL_COMMON */
-static inline void rcu_sysrq_start(void)
-{
-}
-static inline void rcu_sysrq_end(void)
-{
-}
+static inline void rcu_sysrq_start(void) { }
+static inline void rcu_sysrq_end(void) { }
#endif /* #else #ifdef CONFIG_RCU_STALL_COMMON */
#ifdef CONFIG_NO_HZ_FULL
@@ -143,9 +139,7 @@ static inline void rcu_user_exit(void) { }
#ifdef CONFIG_RCU_NOCB_CPU
void rcu_init_nohz(void);
#else /* #ifdef CONFIG_RCU_NOCB_CPU */
-static inline void rcu_init_nohz(void)
-{
-}
+static inline void rcu_init_nohz(void) { }
#endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */
/**
@@ -243,21 +237,10 @@ void destroy_rcu_head(struct rcu_head *head);
void init_rcu_head_on_stack(struct rcu_head *head);
void destroy_rcu_head_on_stack(struct rcu_head *head);
#else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
-static inline void init_rcu_head(struct rcu_head *head)
-{
-}
-
-static inline void destroy_rcu_head(struct rcu_head *head)
-{
-}
-
-static inline void init_rcu_head_on_stack(struct rcu_head *head)
-{
-}
-
-static inline void destroy_rcu_head_on_stack(struct rcu_head *head)
-{
-}
+static inline void init_rcu_head(struct rcu_head *head) { }
+static inline void destroy_rcu_head(struct rcu_head *head) { }
+static inline void init_rcu_head_on_stack(struct rcu_head *head) { }
+static inline void destroy_rcu_head_on_stack(struct rcu_head *head) { }
#endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU)
@@ -334,9 +317,7 @@ static inline void rcu_preempt_sleep_check(void)
"Illegal context switch in RCU read-side critical section");
}
#else /* #ifdef CONFIG_PROVE_RCU */
-static inline void rcu_preempt_sleep_check(void)
-{
-}
+static inline void rcu_preempt_sleep_check(void) { }
#endif /* #else #ifdef CONFIG_PROVE_RCU */
#define rcu_sleep_check() \
@@ -915,9 +896,7 @@ static inline bool rcu_sys_is_idle(void)
return false;
}
-static inline void rcu_sysidle_force_exit(void)
-{
-}
+static inline void rcu_sysidle_force_exit(void) { }
#endif /* #else #ifdef CONFIG_NO_HZ_FULL_SYSIDLE */
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 24/88] rcutorture: Reduce CPUs dedicated to testing Classic SRCU |
| Message-ID | <tL97c-5CD-33@gated-at.bofh.it> |
| In reply to | #1650839 |
Given that the plan is to retire Classic SRCU in the near future, this commit reduces the number of CPUs dedicated to testing Classic SRCU. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> --- tools/testing/selftests/rcutorture/configs/rcu/SRCU-C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-C b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-C index e4f8b1b75584..d4e19c087c21 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-C +++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-C @@ -1,6 +1,6 @@ CONFIG_RCU_TRACE=n CONFIG_SMP=y -CONFIG_NR_CPUS=8 +CONFIG_NR_CPUS=3 CONFIG_HOTPLUG_CPU=y CONFIG_RCU_EXPERT=y CONFIG_CLASSIC_SRCU=y -- 2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 77/88] rcu: Remove #ifdef moving rcu_end_inkernel_boot from rcupdate.h |
| Message-ID | <tL97c-5CD-35@gated-at.bofh.it> |
| In reply to | #1650839 |
This commit removes a #ifdef and saves a few lines of code by moving
the rcu_end_inkernel_boot() function from include/linux/rcupdate.h to
include/linux/rcutiny.h (for TINY_RCU) and to include/linux/rcutree.h
(for TREE_RCU).
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcupdate.h | 6 ------
include/linux/rcutiny.h | 2 +-
include/linux/rcutree.h | 1 +
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 7f24a5e673f5..f816fc72b51e 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -111,12 +111,6 @@ void rcu_check_callbacks(int user);
void rcu_report_dead(unsigned int cpu);
void rcu_cpu_starting(unsigned int cpu);
-#ifndef CONFIG_TINY_RCU
-void rcu_end_inkernel_boot(void);
-#else /* #ifndef CONFIG_TINY_RCU */
-static inline void rcu_end_inkernel_boot(void) { }
-#endif /* #ifndef CONFIG_TINY_RCU */
-
#ifdef CONFIG_RCU_STALL_COMMON
void rcu_sysrq_start(void);
void rcu_sysrq_end(void);
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index c869785f16bd..5becbbccb998 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -123,7 +123,7 @@ void rcu_scheduler_starting(void);
#else /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_SRCU) */
static inline void rcu_scheduler_starting(void) { }
#endif /* #else #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_SRCU) */
-
+static inline void rcu_end_inkernel_boot(void) { }
static inline bool rcu_is_watching(void) { return true; }
/* Avoid RCU read-side critical sections leaking across. */
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index d6aa89d15d47..37d6fd3b7ff8 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -91,6 +91,7 @@ void exit_rcu(void);
void rcu_scheduler_starting(void);
extern int rcu_scheduler_active __read_mostly;
+void rcu_end_inkernel_boot(void);
bool rcu_is_watching(void);
void rcu_all_qs(void);
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 78/88] rcu: Remove typecheck() from RCU locking wrapper functions |
| Message-ID | <tL97d-5CD-41@gated-at.bofh.it> |
| In reply to | #1650839 |
Because raw_spin_lock_irqsave() and raw_spin_unlock_irqrestore()
both do typecheck() on their flags argument, there is no point in
duplicating this check in raw_spin_lock_irqsave_rcu_node() and
raw_spin_unlock_irqrestore_rcu_node(). This commit therefore saves
a few lines by removing this duplicated check.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcu/rcu.h | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index 2a75beb883c8..bc55b5716c37 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -334,18 +334,14 @@ do { \
#define raw_spin_unlock_irq_rcu_node(p) \
raw_spin_unlock_irq(&ACCESS_PRIVATE(p, lock))
-#define raw_spin_lock_irqsave_rcu_node(rnp, flags) \
+#define raw_spin_lock_irqsave_rcu_node(p, flags) \
do { \
- typecheck(unsigned long, flags); \
- raw_spin_lock_irqsave(&ACCESS_PRIVATE(rnp, lock), flags); \
+ raw_spin_lock_irqsave(&ACCESS_PRIVATE(p, lock), flags); \
smp_mb__after_unlock_lock(); \
} while (0)
-#define raw_spin_unlock_irqrestore_rcu_node(rnp, flags) \
-do { \
- typecheck(unsigned long, flags); \
- raw_spin_unlock_irqrestore(&ACCESS_PRIVATE(rnp, lock), flags); \
-} while (0)
+#define raw_spin_unlock_irqrestore_rcu_node(p, flags) \
+ raw_spin_unlock_irqrestore(&ACCESS_PRIVATE(p, lock), flags) \
#define raw_spin_trylock_rcu_node(p) \
({ \
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 70/88] rcu: Refactor #includes from include/linux/rcupdate.h |
| Message-ID | <tL97d-5CD-39@gated-at.bofh.it> |
| In reply to | #1650839 |
The list of #includes from include/linux/rcupdate.h has grown quite
a bit, so it is time to trim it. This commit moves the #include
of include/linux/ktime.h to include/linux/rcutiny.h, along with the
Tiny-RCU-only function that was the only thing needing ktimem.h. It then
reconstructs the files included into include/linux/ktime.h based on what
is actually needed, with significant help from the 0day Test Robot.
This single change reduces the .i file footprint from rcupdate.h from
9018 lines to 7101 lines.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcupdate.h | 22 ++++++----------------
include/linux/rcutiny.h | 8 +++++++-
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 564096e6e141..ee40d7eba741 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -34,16 +34,14 @@
#define __LINUX_RCUPDATE_H
#include <linux/types.h>
-#include <linux/cache.h>
-#include <linux/spinlock.h>
-#include <linux/threads.h>
-#include <linux/cpumask.h>
-#include <linux/seqlock.h>
-#include <linux/lockdep.h>
-#include <linux/bug.h>
#include <linux/compiler.h>
-#include <linux/ktime.h>
+#include <linux/atomic.h>
#include <linux/irqflags.h>
+#include <linux/preempt.h>
+#include <linux/bottom_half.h>
+#include <linux/lockdep.h>
+#include <asm/processor.h>
+#include <linux/cpumask.h>
#define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b))
#define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b))
@@ -856,14 +854,6 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
#define kfree_rcu(ptr, rcu_head) \
__kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head))
-#ifdef CONFIG_TINY_RCU
-static inline int rcu_needs_cpu(u64 basemono, u64 *nextevt)
-{
- *nextevt = KTIME_MAX;
- return 0;
-}
-#endif /* #ifdef CONFIG_TINY_RCU */
-
/* Only for use by adaptive-ticks code. */
#ifdef CONFIG_NO_HZ_FULL_SYSIDLE
bool rcu_sys_is_idle(void);
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 2bfe48bc0e3b..c869785f16bd 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -25,7 +25,7 @@
#ifndef __LINUX_TINY_H
#define __LINUX_TINY_H
-#include <linux/cache.h>
+#include <linux/ktime.h>
struct rcu_dynticks;
static inline int rcu_dynticks_snap(struct rcu_dynticks *rdtp)
@@ -96,6 +96,12 @@ static inline void kfree_call_rcu(struct rcu_head *head,
rcu_note_voluntary_context_switch_lite(current); \
} while (0)
+static inline int rcu_needs_cpu(u64 basemono, u64 *nextevt)
+{
+ *nextevt = KTIME_MAX;
+ return 0;
+}
+
/*
* Take advantage of the fact that there is only one CPU, which
* allows us to ignore virtualization-based context switches.
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 36/88] srcu: Print non-default exp_holdoff values at boot time |
| Message-ID | <tL97d-5CD-45@gated-at.bofh.it> |
| In reply to | #1650839 |
This commit makes srcu_bootup_announce() check for non-default values
of the auto-expedite holdoff time exp_holdoff and print a message if so.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcu/srcutree.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
index 021a9521a8b8..a46142de5133 100644
--- a/kernel/rcu/srcutree.c
+++ b/kernel/rcu/srcutree.c
@@ -40,7 +40,9 @@
#include "rcu.h"
#include "rcu_segcblist.h"
-static ulong exp_holdoff = 25 * 1000; /* Holdoff (ns) for auto-expediting. */
+/* Holdoff in nanoseconds for auto-expediting. */
+#define DEFAULT_SRCU_EXP_HOLDOFF (25 * 1000)
+static ulong exp_holdoff = DEFAULT_SRCU_EXP_HOLDOFF;
module_param(exp_holdoff, ulong, 0444);
static void srcu_invoke_callbacks(struct work_struct *work);
@@ -1172,6 +1174,8 @@ EXPORT_SYMBOL_GPL(srcutorture_get_gp_data);
static int __init srcu_bootup_announce(void)
{
pr_info("Hierarchical SRCU implementation.\n");
+ if (exp_holdoff != DEFAULT_SRCU_EXP_HOLDOFF)
+ pr_info("\tNon-default auto-expedite holdoff of %lu ns.\n", exp_holdoff);
return 0;
}
early_initcall(srcu_bootup_announce);
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 01/88] rcutorture: Add lockdep to one of the SRCU scenarios |
| Message-ID | <tL97d-5CD-47@gated-at.bofh.it> |
| In reply to | #1650839 |
Back when SRCU was simpler, there wasn't much need for lockdep. However, with Tree SRCU, it is needed. This commit therefore adds CONFIG_PROVE_LOCKING to the SRCU-P scenario. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> --- tools/testing/selftests/rcutorture/configs/rcu/SRCU-P | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P index 4837430a71c0..8205b481d9ed 100644 --- a/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P +++ b/tools/testing/selftests/rcutorture/configs/rcu/SRCU-P @@ -6,3 +6,5 @@ CONFIG_PREEMPT_NONE=n CONFIG_PREEMPT_VOLUNTARY=n CONFIG_PREEMPT=y #CHECK#CONFIG_RCU_EXPERT=n +CONFIG_DEBUG_LOCK_ALLOC=y +CONFIG_PROVE_LOCKING=y -- 2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 51/88] rcu: Move expediting-related access/control out of rcupdate.h |
| Message-ID | <tL97d-5CD-49@gated-at.bofh.it> |
| In reply to | #1650839 |
The rcu_gp_is_normal(), rcu_gp_is_expedited(), rcu_expedite_gp(), and
rcu_unexpedite_gp() functions are intended only for use within the
RCU implementation itself -- the sysfs access is what should be used
outside of RCU. This commit therefore moves the declarations for
these functions to kernel/rcu/rcu.h, and also includes this file into
kernel/rcu/rcutorture.c and kernel/rcu/rcuperf.c. This also has the
beneficial effect of shrinking rcupdate.c a bit.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcupdate.h | 26 --------------------------
kernel/rcu/rcu.h | 26 ++++++++++++++++++++++++++
kernel/rcu/rcuperf.c | 2 ++
kernel/rcu/rcutorture.c | 2 ++
4 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 6e7e930c1610..049c62c59f1b 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -46,32 +46,6 @@
#include <linux/ktime.h>
#include <linux/irqflags.h>
-#ifdef CONFIG_TINY_RCU
-/* Tiny RCU doesn't expedite, as its purpose in life is instead to be tiny. */
-static inline bool rcu_gp_is_normal(void) /* Internal RCU use. */
-{
- return true;
-}
-static inline bool rcu_gp_is_expedited(void) /* Internal RCU use. */
-{
- return false;
-}
-
-static inline void rcu_expedite_gp(void)
-{
-}
-
-static inline void rcu_unexpedite_gp(void)
-{
-}
-#else /* #ifdef CONFIG_TINY_RCU */
-bool rcu_gp_is_normal(void); /* Internal RCU use. */
-bool rcu_gp_is_expedited(void); /* Internal RCU use. */
-void rcu_expedite_gp(void);
-void rcu_unexpedite_gp(void);
-void rcupdate_announce_bootup_oddness(void);
-#endif /* #else #ifdef CONFIG_TINY_RCU */
-
enum rcutorture_type {
RCU_FLAVOR,
RCU_BH_FLAVOR,
diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index 73e16ec4054b..ceb78110db1b 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -293,4 +293,30 @@ static inline void rcu_init_levelspread(int *levelspread, const int *levelcnt)
#endif /* #if defined(SRCU) || !defined(TINY_RCU) */
+#ifdef CONFIG_TINY_RCU
+/* Tiny RCU doesn't expedite, as its purpose in life is instead to be tiny. */
+static inline bool rcu_gp_is_normal(void) /* Internal RCU use. */
+{
+ return true;
+}
+static inline bool rcu_gp_is_expedited(void) /* Internal RCU use. */
+{
+ return false;
+}
+
+static inline void rcu_expedite_gp(void)
+{
+}
+
+static inline void rcu_unexpedite_gp(void)
+{
+}
+#else /* #ifdef CONFIG_TINY_RCU */
+bool rcu_gp_is_normal(void); /* Internal RCU use. */
+bool rcu_gp_is_expedited(void); /* Internal RCU use. */
+void rcu_expedite_gp(void);
+void rcu_unexpedite_gp(void);
+void rcupdate_announce_bootup_oddness(void);
+#endif /* #else #ifdef CONFIG_TINY_RCU */
+
#endif /* __LINUX_RCU_H */
diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
index d80f11d9f8bd..3cc18110b612 100644
--- a/kernel/rcu/rcuperf.c
+++ b/kernel/rcu/rcuperf.c
@@ -48,6 +48,8 @@
#include <linux/torture.h>
#include <linux/vmalloc.h>
+#include "rcu.h"
+
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Paul E. McKenney <paulmck@linux.vnet.ibm.com>");
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index a58592b73f19..03cdf79e73d4 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -52,6 +52,8 @@
#include <linux/torture.h>
#include <linux/vmalloc.h>
+#include "rcu.h"
+
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Paul E. McKenney <paulmck@us.ibm.com> and Josh Triplett <josh@joshtriplett.org>");
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 61/88] rcu: move rcupdate.h to the new true/false-function style |
| Message-ID | <tL97d-5CD-43@gated-at.bofh.it> |
| In reply to | #1650839 |
This commit saves a few lines in include/linux/rcupdate.h by moving
to single-line definitions for functions that just return either true
or false, instead of the old style where the two curly braces each get
their own line.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcupdate.h | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index ad5e6934dcf3..564096e6e141 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -237,10 +237,7 @@ static inline void destroy_rcu_head_on_stack(struct rcu_head *head) { }
#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU)
bool rcu_lockdep_current_cpu_online(void);
#else /* #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU) */
-static inline bool rcu_lockdep_current_cpu_online(void)
-{
- return true;
-}
+static inline bool rcu_lockdep_current_cpu_online(void) { return true; }
#endif /* #else #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PROVE_RCU) */
#ifdef CONFIG_DEBUG_LOCK_ALLOC
@@ -872,14 +869,8 @@ static inline int rcu_needs_cpu(u64 basemono, u64 *nextevt)
bool rcu_sys_is_idle(void);
void rcu_sysidle_force_exit(void);
#else /* #ifdef CONFIG_NO_HZ_FULL_SYSIDLE */
-
-static inline bool rcu_sys_is_idle(void)
-{
- return false;
-}
-
+static inline bool rcu_sys_is_idle(void) { return false; }
static inline void rcu_sysidle_force_exit(void) { }
-
#endif /* #else #ifdef CONFIG_NO_HZ_FULL_SYSIDLE */
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 66/88] srcu: Prevent sdp->srcu_gp_seq_needed counter wrap |
| Message-ID | <tL97d-5CD-51@gated-at.bofh.it> |
| In reply to | #1650839 |
If a given CPU never happens to ever start an SRCU grace period, the
grace-period sequence counter might wrap. If this CPU were to decide to
finally start a grace period, the state of its sdp->srcu_gp_seq_needed
might make it appear that it has already requested this grace period,
which would prevent starting the grace period. If no other CPU ever started
a grace period again, this would look like a grace-period hang. Even
if some other CPU took pity and started the needed grace period, the
leaf rcu_node structure's ->srcu_data_have_cbs field won't have record
of the fact that this CPU has a callback pending, which would look like
a very localized grace-period hang.
This might seem very unlikely, but SRCU grace periods can take less than
a microsecond on small systems, which means that overflow can happen
in much less than an hour on a 32-bit embedded system. And embedded
systems are especially likely to have long-term idle CPUs. Therefore,
it makes sense to prevent this scenario from happening.
This commit therefore scans each srcu_data structure occasionally,
with frequency controlled by the srcutree.counter_wrap_check kernel
boot parameter. This parameter can be set to something like 255
in order to exercise the counter-wrap-prevention code.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
Documentation/admin-guide/kernel-parameters.txt | 9 +++++++++
kernel/rcu/srcutree.c | 18 ++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 01b5ab92d251..6671f9b60a86 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3810,6 +3810,15 @@
spia_pedr=
spia_peddr=
+ srcutree.counter_wrap_check [KNL]
+ Specifies how frequently to check for
+ grace-period sequence counter wrap for the
+ srcu_data structure's ->srcu_gp_seq_needed field.
+ The greater the number of bits set in this kernel
+ parameter, the less frequently counter wrap will
+ be checked for. Note that the bottom two bits
+ are ignored.
+
srcutree.exp_holdoff [KNL]
Specifies how many nanoseconds must elapse
since the end of the last SRCU grace period for
diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
index 31203469b2d1..b4058d2a4e8d 100644
--- a/kernel/rcu/srcutree.c
+++ b/kernel/rcu/srcutree.c
@@ -45,6 +45,10 @@
static ulong exp_holdoff = DEFAULT_SRCU_EXP_HOLDOFF;
module_param(exp_holdoff, ulong, 0444);
+/* Overflow-check frequency. N bits roughly says every 2**N grace periods. */
+static ulong counter_wrap_check = (ULONG_MAX >> 2);
+module_param(counter_wrap_check, ulong, 0444);
+
static void srcu_invoke_callbacks(struct work_struct *work);
static void srcu_reschedule(struct srcu_struct *sp, unsigned long delay);
@@ -497,10 +501,13 @@ static void srcu_gp_end(struct srcu_struct *sp)
{
unsigned long cbdelay;
bool cbs;
+ int cpu;
+ unsigned long flags;
unsigned long gpseq;
int idx;
int idxnext;
unsigned long mask;
+ struct srcu_data *sdp;
struct srcu_node *snp;
/* Prevent more than one additional grace period. */
@@ -539,6 +546,17 @@ static void srcu_gp_end(struct srcu_struct *sp)
smp_mb(); /* GP end before CB invocation. */
srcu_schedule_cbs_snp(sp, snp, mask, cbdelay);
}
+
+ /* Occasionally prevent srcu_data counter wrap. */
+ if (!(gpseq & counter_wrap_check))
+ for (cpu = snp->grplo; cpu <= snp->grphi; cpu++) {
+ sdp = per_cpu_ptr(sp->sda, cpu);
+ spin_lock_irqsave(&sdp->lock, flags);
+ if (ULONG_CMP_GE(gpseq,
+ sdp->srcu_gp_seq_needed + 100))
+ sdp->srcu_gp_seq_needed = gpseq;
+ spin_unlock_irqrestore(&sdp->lock, flags);
+ }
}
/* Callback initiation done, allow grace periods after next. */
--
2.5.2
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 00:10 +0200 |
| Subject | [PATCH tip/core/rcu 71/88] rcu: Convert rnp->lock wrappers to macros for SRCU use |
| Message-ID | <tL97d-5CD-53@gated-at.bofh.it> |
| In reply to | #1650839 |
Use of smp_mb__after_unlock_lock() would allow SRCU to omit a full
memory barrier during callback execution, so this commit converts
raw_spin_lock_rcu_node() from inline functions to type-generic macros
to allow them to handle locks in srcu_node structures as well as
rcu_node structures.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcu/tree.h | 47 +++++++++++++++++++++--------------------------
1 file changed, 21 insertions(+), 26 deletions(-)
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index ddfa34d020ba..a7f63f1074b4 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -580,27 +580,22 @@ static inline void rcu_nocb_q_lengths(struct rcu_data *rdp, long *ql, long *qll)
* As ->lock of struct rcu_node is a __private field, therefore one should use
* these wrappers rather than directly call raw_spin_{lock,unlock}* on ->lock.
*/
-static inline void raw_spin_lock_rcu_node(struct rcu_node *rnp)
-{
- raw_spin_lock(&ACCESS_PRIVATE(rnp, lock));
- smp_mb__after_unlock_lock();
-}
+#define raw_spin_lock_rcu_node(p) \
+do { \
+ raw_spin_lock(&ACCESS_PRIVATE(p, lock)); \
+ smp_mb__after_unlock_lock(); \
+} while (0)
-static inline void raw_spin_unlock_rcu_node(struct rcu_node *rnp)
-{
- raw_spin_unlock(&ACCESS_PRIVATE(rnp, lock));
-}
+#define raw_spin_unlock_rcu_node(p) raw_spin_unlock(&ACCESS_PRIVATE(p, lock))
-static inline void raw_spin_lock_irq_rcu_node(struct rcu_node *rnp)
-{
- raw_spin_lock_irq(&ACCESS_PRIVATE(rnp, lock));
- smp_mb__after_unlock_lock();
-}
+#define raw_spin_lock_irq_rcu_node(p) \
+do { \
+ raw_spin_lock_irq(&ACCESS_PRIVATE(p, lock)); \
+ smp_mb__after_unlock_lock(); \
+} while (0)
-static inline void raw_spin_unlock_irq_rcu_node(struct rcu_node *rnp)
-{
- raw_spin_unlock_irq(&ACCESS_PRIVATE(rnp, lock));
-}
+#define raw_spin_unlock_irq_rcu_node(p) \
+ raw_spin_unlock_irq(&ACCESS_PRIVATE(p, lock))
#define raw_spin_lock_irqsave_rcu_node(rnp, flags) \
do { \
@@ -615,11 +610,11 @@ do { \
raw_spin_unlock_irqrestore(&ACCESS_PRIVATE(rnp, lock), flags); \
} while (0)
-static inline bool raw_spin_trylock_rcu_node(struct rcu_node *rnp)
-{
- bool locked = raw_spin_trylock(&ACCESS_PRIVATE(rnp, lock));
-
- if (locked)
- smp_mb__after_unlock_lock();
- return locked;
-}
+#define raw_spin_trylock_rcu_node(p) \
+({ \
+ bool ___locked = raw_spin_trylock(&ACCESS_PRIVATE(p, lock)); \
+ \
+ if (___locked) \
+ smp_mb__after_unlock_lock(); \
+ ___locked; \
+})
--
2.5.2
[toc] | [prev] | [next] | [standalone]
Page 1 of 5 [1] 2 3 4 5 Next page →
Back to top | Article view | linux.kernel
csiph-web