From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754559AbbIBMdW (ORCPT ); Wed, 2 Sep 2015 08:33:22 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:33350 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754104AbbIBMdV (ORCPT ); Wed, 2 Sep 2015 08:33:21 -0400 Message-ID: <1441197197.4163.35.camel@gmail.com> Subject: Re: [PATCH 1/2] nohz: Affine unpinned timers to housekeepers From: Mike Galbraith To: Frederic Weisbecker Cc: "Jiang, Yunhong" , Ingo Molnar , Peter Zijlstra , LKML , Vatika Harlalka , Chris Metcalf , Thomas Gleixner , Preeti U Murthy , Christoph Lameter , "Paul E . McKenney" Date: Wed, 02 Sep 2015 14:33:17 +0200 In-Reply-To: <1441186689.4163.11.camel@gmail.com> References: <1441119060-2230-1-git-send-email-fweisbec@gmail.com> <1441119060-2230-2-git-send-email-fweisbec@gmail.com> <20150901204723.GA6590@lerouge> <1441186689.4163.11.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-09-02 at 11:38 +0200, Mike Galbraith wrote: > On Tue, 2015-09-01 at 22:47 +0200, Frederic Weisbecker wrote: > > On Tue, Sep 01, 2015 at 07:14:13PM +0000, Jiang, Yunhong wrote: > > > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > > > index 8b864ec..0902e4d 100644 > > > > --- a/kernel/sched/core.c > > > > +++ b/kernel/sched/core.c > > > > @@ -623,18 +623,21 @@ int get_nohz_timer_target(void) > > > > int i, cpu = smp_processor_id(); > > > > struct sched_domain *sd; > > > > > > > > - if (!idle_cpu(cpu)) > > > > + if (!idle_cpu(cpu) && is_housekeeping_cpu(cpu)) > > > > return cpu; > > > > > > > > rcu_read_lock(); > > > > for_each_domain(cpu, sd) { > > > > for_each_cpu(i, sched_domain_span(sd)) { > > > > - if (!idle_cpu(i)) { > > > > + if (!idle_cpu(i) && is_housekeeping_cpu(cpu)) { > > > > > > Hi, Frederic, sorry for a naive question. Per my understanding, the tick_nohz_full_mask is added to cpu_isolated_map in > > > sched_init_smp(), and the cpu_isolated_map is excluded from sched_domain in init_sched_domains(), so why check here? > > > > Very good observation! But it's better to keep this check in the domain loop in > > case things change in the future such as removing that cpu_isolated_map inclusion > > or other suprises. > > IMHO, nohz_full -> cpu_isolated_map removal really wants to happen. > NO_HZ_FULL_ALL currently means "Woohoo, next stop NR_CPUS=0". (which surprises folks who have [had] it enabled [and may even have been using and/or testing it]) https://lkml.org/lkml/2015/9/2/145