summaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-01-25 02:27:26 -0500
committerIngo Molnar <mingo@kernel.org>2014-01-25 02:27:26 -0500
commita2b4c607c93a0850c8e3d90688cf3bd08576b986 (patch)
treefd1ef8cd906a864f6db3551b3891fd5d0c2075fd /kernel/time
parent15c81026204da897a05424c79263aea861a782cc (diff)
parent8fe8ff09ce3b5750e1f3e45a1f4a81d59c7ff1f1 (diff)
Merge branch 'timers/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into timers/urgent
Pull dynticks cleanups from Frederic Weisbecker. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/tick-sched.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 08cb0c3b8ccb..9f8af69c67ec 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -533,12 +533,13 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
533 struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev; 533 struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev;
534 u64 time_delta; 534 u64 time_delta;
535 535
536 time_delta = timekeeping_max_deferment();
537
536 /* Read jiffies and the time when jiffies were updated last */ 538 /* Read jiffies and the time when jiffies were updated last */
537 do { 539 do {
538 seq = read_seqbegin(&jiffies_lock); 540 seq = read_seqbegin(&jiffies_lock);
539 last_update = last_jiffies_update; 541 last_update = last_jiffies_update;
540 last_jiffies = jiffies; 542 last_jiffies = jiffies;
541 time_delta = timekeeping_max_deferment();
542 } while (read_seqretry(&jiffies_lock, seq)); 543 } while (read_seqretry(&jiffies_lock, seq));
543 544
544 if (rcu_needs_cpu(cpu, &rcu_delta_jiffies) || 545 if (rcu_needs_cpu(cpu, &rcu_delta_jiffies) ||
@@ -678,18 +679,18 @@ out:
678static void tick_nohz_full_stop_tick(struct tick_sched *ts) 679static void tick_nohz_full_stop_tick(struct tick_sched *ts)
679{ 680{
680#ifdef CONFIG_NO_HZ_FULL 681#ifdef CONFIG_NO_HZ_FULL
681 int cpu = smp_processor_id(); 682 int cpu = smp_processor_id();
682 683
683 if (!tick_nohz_full_cpu(cpu) || is_idle_task(current)) 684 if (!tick_nohz_full_cpu(cpu) || is_idle_task(current))
684 return; 685 return;
685 686
686 if (!ts->tick_stopped && ts->nohz_mode == NOHZ_MODE_INACTIVE) 687 if (!ts->tick_stopped && ts->nohz_mode == NOHZ_MODE_INACTIVE)
687 return; 688 return;
688 689
689 if (!can_stop_full_tick()) 690 if (!can_stop_full_tick())
690 return; 691 return;
691 692
692 tick_nohz_stop_sched_tick(ts, ktime_get(), cpu); 693 tick_nohz_stop_sched_tick(ts, ktime_get(), cpu);
693#endif 694#endif
694} 695}
695 696
@@ -1023,7 +1024,7 @@ static void tick_nohz_kick_tick(struct tick_sched *ts, ktime_t now)
1023#endif 1024#endif
1024} 1025}
1025 1026
1026static inline void tick_check_nohz_this_cpu(void) 1027static inline void tick_nohz_irq_enter(void)
1027{ 1028{
1028 struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); 1029 struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
1029 ktime_t now; 1030 ktime_t now;
@@ -1042,17 +1043,17 @@ static inline void tick_check_nohz_this_cpu(void)
1042#else 1043#else
1043 1044
1044static inline void tick_nohz_switch_to_nohz(void) { } 1045static inline void tick_nohz_switch_to_nohz(void) { }
1045static inline void tick_check_nohz_this_cpu(void) { } 1046static inline void tick_nohz_irq_enter(void) { }
1046 1047
1047#endif /* CONFIG_NO_HZ_COMMON */ 1048#endif /* CONFIG_NO_HZ_COMMON */
1048 1049
1049/* 1050/*
1050 * Called from irq_enter to notify about the possible interruption of idle() 1051 * Called from irq_enter to notify about the possible interruption of idle()
1051 */ 1052 */
1052void tick_check_idle(void) 1053void tick_irq_enter(void)
1053{ 1054{
1054 tick_check_oneshot_broadcast_this_cpu(); 1055 tick_check_oneshot_broadcast_this_cpu();
1055 tick_check_nohz_this_cpu(); 1056 tick_nohz_irq_enter();
1056} 1057}
1057 1058
1058/* 1059/*