Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753527AbbFLHgz (ORCPT ); Fri, 12 Jun 2015 03:36:55 -0400 Received: from casper.infradead.org ([85.118.1.10]:46792 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752413AbbFLHgy (ORCPT ); Fri, 12 Jun 2015 03:36:54 -0400 Date: Fri, 12 Jun 2015 09:36:50 +0200 From: Peter Zijlstra To: Frederic Weisbecker Cc: LKML , Thomas Gleixner , Preeti U Murthy , Christoph Lameter , Ingo Molnar , Viresh Kumar , Rik van Riel Subject: Re: [PATCH 7/8] nohz: Evaluate tick dependency once on context switch Message-ID: <20150612073650.GP3644@twins.programming.kicks-ass.net> References: <1434044168-23173-1-git-send-email-fweisbec@gmail.com> <1434044168-23173-8-git-send-email-fweisbec@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1434044168-23173-8-git-send-email-fweisbec@gmail.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1327 Lines: 40 On Thu, Jun 11, 2015 at 07:36:07PM +0200, Frederic Weisbecker wrote: > +static void tick_nohz_full_update_dependencies(void) > +{ > + struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); > + > + if (!posix_cpu_timers_can_stop_tick(current)) > + ts->tick_needed |= TICK_NEEDED_POSIX_CPU_TIMER; > + > + if (!perf_event_can_stop_tick()) > + ts->tick_needed |= TICK_NEEDED_PERF_EVENT; > + > + if (!sched_can_stop_tick()) > + ts->tick_needed |= TICK_NEEDED_SCHED; > > #ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK > /* > + * sched_clock_tick() needs us? > + * > * TODO: kick full dynticks CPUs when > * sched_clock_stable is set. > */ > if (!sched_clock_stable()) { > + ts->tick_needed |= TICK_NEEDED_CLOCK_UNSTABLE; > /* > * Don't allow the user to think they can get > * full NO_HZ with this machine. > */ > WARN_ONCE(tick_nohz_full_running, > "NO_HZ FULL will not work with unstable sched clock"); > } > #endif > } Colour me confused; why does this function exist at all? Should not these bits be managed by those respective subsystems? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/