Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1650858
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH tip/core/rcu 70/88] rcu: Refactor #includes from include/linux/rcupdate.h |
| Date | 2017-05-26 00:10 +0200 |
| Message-ID | <tL97d-5CD-39@gated-at.bofh.it> (permalink) |
| References | <tL8Xv-5iU-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[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
csiph-web