Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1434559

Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because the skew is too large:

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because the skew is too large:
Date 2016-06-30 15:50 +0200
Message-ID <rPKvT-1LB-3@gated-at.bofh.it> (permalink)
References (4 earlier) <rPGiC-7LV-21@gated-at.bofh.it> <rPGVj-7Zc-3@gated-at.bofh.it> <rPGVj-7Zc-1@gated-at.bofh.it> <rPIaK-to-23@gated-at.bofh.it> <rPKmd-1Ib-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 30 Jun 2016, Mike Galbraith wrote:
> 
> Lunch rendered me (yawn) comatose, so I'm a bit late, but sent.

Patch below should fix the issue - the timer one, not yours :)

Thanks,

	tglx

8<------------

diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 3e0c4e60bf6a..2b72eda3dc79 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -531,28 +531,37 @@ __internal_add_timer(struct timer_base *base, struct timer_list *timer)
 static void
 trigger_dyntick_cpu(struct timer_base *base, struct timer_list *timer)
 {
+	if (!IS_ENABLED(CONFIG_NO_HZ_COMMON) || !base->nohz_active)
+		return;
+
+	/*
+	 * This wants some optimizing similar to the below, but we do that
+	 * when we switch from push to pull for deferrable timers.
+	 */
+	if (timer->flags & TIMER_DEFERRABLE) {
+		if (tick_nohz_full_cpu(base->cpu))
+			wake_up_nohz_cpu(base->cpu);
+		return;
+	}
+
 	/*
 	 * We might have to IPI the remote CPU if the base is idle and the
 	 * timer is not deferrable. If the other cpu is on the way to idle
 	 * then it can't set base->is_idle as we hold base lock.
 	 */
-	if (!IS_ENABLED(CONFIG_NO_HZ_COMMON) || !base->is_idle ||
-	    (timer->flags & TIMER_DEFERRABLE))
+	if (!base->is_idle)
 		return;
 
 	/* Check whether this is the new first expiring timer */
 	if (time_after_eq(timer->expires, base->next_expiry))
 		return;
-	base->next_expiry = timer->expires;
 
 	/*
-	 * Check whether the other CPU is in dynticks mode and needs to be
-	 * triggered to reevaluate the timer wheel.  We are protected against
-	 * the other CPU fiddling with the timer by holding the timer base
-	 * lock.
+	 * Set the next expiry time and kick the cpu so it can reevaluate the
+	 * wheel
 	 */
-	if (tick_nohz_full_cpu(base->cpu))
-		wake_up_nohz_cpu(base->cpu);
+	base->next_expiry = timer->expires;
+	wake_up_nohz_cpu(base->cpu);
 }
 
 static void

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

rc5+tip/master: Marking clocksource 'tsc' as unstable because the  skew is too large: Borislav Petkov <bp@alien8.de> - 2016-06-27 22:10 +0200
  Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Borislav Petkov <bp@alien8.de> - 2016-06-29 19:20 +0200
    Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-06-30 10:00 +0200
      Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Thomas Gleixner <tglx@linutronix.de> - 2016-06-30 10:50 +0200
        Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-06-30 11:20 +0200
          Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-06-30 12:00 +0200
            Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-06-30 12:30 +0200
              Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Thomas Gleixner <tglx@linutronix.de> - 2016-06-30 12:40 +0200
            Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Thomas Gleixner <tglx@linutronix.de> - 2016-06-30 13:20 +0200
              Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-06-30 15:40 +0200
                Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Thomas Gleixner <tglx@linutronix.de> - 2016-06-30 15:50 +0200
                Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Borislav Petkov <bp@alien8.de> - 2016-06-30 16:30 +0200
                Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Mike Galbraith <umgwanakikbuti@gmail.com> - 2016-06-30 16:40 +0200
                Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Richard Cochran <richardcochran@gmail.com> - 2016-06-30 22:20 +0200
          Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Thomas Gleixner <tglx@linutronix.de> - 2016-06-30 12:20 +0200
    Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Thomas Gleixner <tglx@linutronix.de> - 2016-06-30 10:50 +0200
      Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because  the skew is too large: Borislav Petkov <bp@alien8.de> - 2016-06-30 12:00 +0200

csiph-web