]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nohz: Move nohz full init call to tick init
authorFrederic Weisbecker <fweisbec@gmail.com>
Sat, 16 Aug 2014 15:47:18 +0000 (17:47 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 13 Sep 2014 16:34:44 +0000 (18:34 +0200)
This way we unbloat a bit main.c and more importantly we initialize
nohz full after init_IRQ(). This dependency will be needed in further
patches because nohz full needs irq work to raise its own IRQ.
Information about the support for this ability on ARM64 is obtained on
init_IRQ() which initialize the pointer to __smp_call_function.

Since tick_init() is called right after init_IRQ(), this is a good place
to call tick_nohz_init() and prepare for that dependency.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
include/linux/tick.h
init/main.c
kernel/time/tick-common.c
kernel/time/tick-internal.h

index 9a82c7dc3fdd9f1fd35d62fb2ab0734516c9ad6c..595ee86f5e0dba847e6a0d7199fac8b5739d6d0f 100644 (file)
@@ -181,14 +181,12 @@ static inline bool tick_nohz_full_cpu(int cpu)
        return cpumask_test_cpu(cpu, tick_nohz_full_mask);
 }
 
-extern void tick_nohz_init(void);
 extern void __tick_nohz_full_check(void);
 extern void tick_nohz_full_kick(void);
 extern void tick_nohz_full_kick_cpu(int cpu);
 extern void tick_nohz_full_kick_all(void);
 extern void __tick_nohz_task_switch(struct task_struct *tsk);
 #else
-static inline void tick_nohz_init(void) { }
 static inline bool tick_nohz_full_enabled(void) { return false; }
 static inline bool tick_nohz_full_cpu(int cpu) { return false; }
 static inline void __tick_nohz_full_check(void) { }
index bb1aed928f21391b63493112c6bb1a1eae39077f..8af2f1abfe38d5f36eade88169f4f9cd04d8ec5a 100644 (file)
@@ -577,7 +577,6 @@ asmlinkage __visible void __init start_kernel(void)
                local_irq_disable();
        idr_init_cache();
        rcu_init();
-       tick_nohz_init();
        context_tracking_init();
        radix_tree_init();
        /* init some links before init_ISA_irqs() */
index 0a0608edeb2665e88d2cb1c917b4cf4f112a4e8e..052b4b53c3d6610b59bb426e785450707b6253f3 100644 (file)
@@ -400,4 +400,5 @@ void tick_resume(void)
 void __init tick_init(void)
 {
        tick_broadcast_init();
+       tick_nohz_init();
 }
index c19c1d84b6f34f66e84b32627b702756364e614a..366aeb4f2c6696ee6239e501ea4904f3812cd44c 100644 (file)
@@ -99,6 +99,13 @@ static inline int tick_broadcast_oneshot_active(void) { return 0; }
 static inline bool tick_broadcast_oneshot_available(void) { return false; }
 #endif /* !TICK_ONESHOT */
 
+/* NO_HZ_FULL internal */
+#ifdef CONFIG_NO_HZ_FULL
+extern void tick_nohz_init(void);
+# else
+static inline void tick_nohz_init(void) { }
+#endif
+
 /*
  * Broadcasting support
  */