From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1041503AbdDURK1 (ORCPT ); Fri, 21 Apr 2017 13:10:27 -0400 Received: from merlin.infradead.org ([205.233.59.134]:40866 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422792AbdDURHv (ORCPT ); Fri, 21 Apr 2017 13:07:51 -0400 Date: Fri, 21 Apr 2017 17:28:11 +0200 From: Peter Zijlstra To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, ville.syrjala@linux.intel.com, daniel.lezcano@linaro.org, rafael.j.wysocki@intel.com, marta.lofstedt@intel.com, martin.peres@linux.intel.com, pasha.tatashin@oracle.com, daniel.vetter@ffwll.ch Subject: Re: [PATCH 6/9] sched/clock: Remove watchdog touching Message-ID: <20170421152811.xh52jpht6rcnxnpu@hirez.programming.kicks-ass.net> References: <20170421145756.305735607@infradead.org> <20170421150734.176731302@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170421150734.176731302@infradead.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 21, 2017 at 04:58:02PM +0200, Peter Zijlstra wrote: > Commit: > > 2bacec8c318c ("sched: touch softlockup watchdog after idling") > > introduced the touch_softlockup_watchdog_sched() call without > justification and I feel sched_clock management is not the right > place, it should only be concerned with producing semi coherent time. > > If this causes watchdog thingies, we can find a better place. Hurmph, the rest should've gone in the next patch, which calls sched_clock_idle_wakeup_event() from a place with IRQs enabled. > Signed-off-by: Peter Zijlstra (Intel) > --- > kernel/sched/clock.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > --- a/kernel/sched/clock.c > +++ b/kernel/sched/clock.c > @@ -410,15 +410,21 @@ void sched_clock_idle_sleep_event(void) > EXPORT_SYMBOL_GPL(sched_clock_idle_sleep_event); > > /* > - * We just idled; resync with ktime. (called with irqs disabled): > + * We just idled; resync with ktime. > */ > void sched_clock_idle_wakeup_event(void) > { > - if (timekeeping_suspended) > + unsigned long flags; > + > + if (sched_clock_stable()) > + return; > + > + if (unlikely(timekeeping_suspended)) > return; > > + local_irq_save(flags); > sched_clock_tick(); > - touch_softlockup_watchdog_sched(); > + local_irq_restore(flags); > } > EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event); > > >