From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753449AbbGKIx7 (ORCPT ); Sat, 11 Jul 2015 04:53:59 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:35650 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753235AbbGKIx6 (ORCPT ); Sat, 11 Jul 2015 04:53:58 -0400 Date: Sat, 11 Jul 2015 10:53:53 +0200 From: Ingo Molnar To: Srikar Dronamraju Cc: Rik van Riel , Peter Zijlstra , linux-kernel@vger.kernel.org, Mel Gorman Subject: Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier avatar. Message-ID: <20150711085352.GA23597@gmail.com> References: <1436361633-4970-1-git-send-email-srikar@linux.vnet.ibm.com> <20150708135644.GC23380@gmail.com> <559D4128.2080606@redhat.com> <20150709062926.GA31232@gmail.com> <20150709065746.GE26095@linux.vnet.ibm.com> <20150709080151.GA31669@gmail.com> <20150710172802.GL26095@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150710172802.GL26095@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Srikar Dronamraju wrote: > > > > Which in itself is confusing: WTH do we have a generic switch called 'NUMA' and > > > > then have it disabled? > > > > > > NUMA feature gets enabled on multi-node boxes because of > > > > > > start_kernel() -> numa_policy_init() -> check_numabalancing_enable() -> > > > set_numabalancing_state() -> sched_feat_set("NUMA"); > > > > Ugh, that is nonsensical! > > > > If CONFIG_SCHED_DEBUG is disabled then sched_features is a constant value: > > > > # define const_debug const > > > > ... > > > > extern const_debug unsigned int sysctl_sched_features; > > > > sched_features are _only_ meant for debugging. They turn into an unchangeable set > > of features when SCHED_DEBUG is disabled - and that is very much by design. > > > > The whole set_numabalancing_state() muck needs to be fixed. > > Would something like the below suffice. If yes I can send out a formal > patch for the same. Here we are moving numabalancing_enabled variable to > common i.e for both CONFIG_SCHED_DEBUG and !CONFIG_SCHED_DEBUG. > > Also removing sched_feat_numa because its no more getting used. > numabalancing_enabled is already being used similarly in task_tick_fair > and task_numa_fault. > > -------------->8------------------------------------------------------8<-------------- > > kernel/sched/core.c | 5 +++-- > kernel/sched/fair.c | 2 +- > kernel/sched/sched.h | 6 ------ > 3 files changed, 4 insertions(+), 9 deletions(-) > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 78b4bad10..69ccbda4 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -2059,17 +2059,18 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p) > } > > #ifdef CONFIG_NUMA_BALANCING > +__read_mostly bool numabalancing_enabled; s/numabalancing_enabled/sched_numa_balancing Other than that this would be OK. Thanks, Ingo