From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbcF3Np7 (ORCPT ); Thu, 30 Jun 2016 09:45:59 -0400 Received: from www.linutronix.de ([62.245.132.108]:47155 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424AbcF3Np6 (ORCPT ); Thu, 30 Jun 2016 09:45:58 -0400 Date: Thu, 30 Jun 2016 15:43:34 +0200 (CEST) From: Thomas Gleixner To: Mike Galbraith cc: Borislav Petkov , Peter Zijlstra , x86-ml , lkml Subject: Re: rc5+tip/master: Marking clocksource 'tsc' as unstable because the skew is too large: In-Reply-To: <1467293952.9949.36.camel@gmail.com> Message-ID: References: <20160627200631.GA3678@pd.tnic> <20160629171619.GA3691@pd.tnic> <1467273448.9949.7.camel@gmail.com> <1467278139.9949.16.camel@gmail.com> <1467280185.9949.19.camel@gmail.com> <1467293952.9949.36.camel@gmail.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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