Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1708618ybt; Thu, 2 Jul 2020 11:47:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOh79J1Kqso0+5QJ0MABVU7vlzANYPA9tmM+XGHDb8mG+EVsKDEI4IHHx8q4Gbhm3Ue8vz X-Received: by 2002:a05:6402:203a:: with SMTP id ay26mr25048889edb.276.1593715653439; Thu, 02 Jul 2020 11:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593715653; cv=none; d=google.com; s=arc-20160816; b=U/AVFPZsfte2YNtdBUJY4d/n8xz8goIdqB+k7XdgH+6fGwbzU7VPCc8zvg4f/gmqdT G7ftrsjw76pubizHiJh6KgesFNSeRP7TGiR8tz0rVRjk8EhnvV3kMVrbXtdAfVKyuqqt uj0pr7b6muN+xuepbMKrpKru0G52dTavR7TnaTtA6C7vOJlvPq6AmtvRFu2Z0TZCH9AH 8vjEGXpSYNZt9H41AV7CzXWCehdGFwJD/bOQyWEsC/aV3i1H+yWLqaFjqyvLwzm6wLkm +2TfXt7HqqDp7iZt8mHqDGp5RitWzo3rSmUITvMUewjk0Ig64oQ9jFKWsWzejMnxpul/ CYeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=PZsxRiswMCsr15z8BRei02Ftg8Q5ppNqr+m0FdXfYqM=; b=1Io+M7vqMA3H+5kWtQ3pOvdIbz8Vat1rSWfJLA5FCIAopcQJkeTrZ3boj0H0IX2mAR dTpIj8TeDMYVs8ISzcXAxXRCcy946Bz+sBgVVGZslxNeCosq1Ro3CEz3oRxGxV/en8H4 ywGh6bRLW9VeNDxS7kb2yGn7CH20xPskoymYTKzhHtaczmsOvR1/66b1Vzkj1IvFYWnf K/hms/1JBTtsNKeAeHKPXlHZuJYUX/W2wh3gNaNG1XA1wQuFiaq1xfket584e/1yoNmw 7fmjaTnIjkfiXXt03lh1a4/4HivQCxNPhe38azSXXj6UqYekFFHv5DeJJEONiz5CUt1C Qcow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si6556582ejt.197.2020.07.02.11.47.10; Thu, 02 Jul 2020 11:47:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725994AbgGBSqo (ORCPT + 99 others); Thu, 2 Jul 2020 14:46:44 -0400 Received: from foss.arm.com ([217.140.110.172]:53100 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbgGBSqo (ORCPT ); Thu, 2 Jul 2020 14:46:44 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A3AA41FB; Thu, 2 Jul 2020 11:46:43 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BDE453F71E; Thu, 2 Jul 2020 11:46:42 -0700 (PDT) References: <20200701190656.10126-1-valentin.schneider@arm.com> <20200701190656.10126-5-valentin.schneider@arm.com> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Dietmar Eggemann Cc: linux-kernel@vger.kernel.org, Morten Rasmussen , mingo@kernel.org, peterz@infradead.org, vincent.guittot@linaro.org Subject: Re: [PATCH v3 4/7] arm, sched/topology: Remove SD_SHARE_POWERDOMAIN In-reply-to: Date: Thu, 02 Jul 2020 19:46:40 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/07/20 17:44, Dietmar Eggemann wrote: > On 01/07/2020 21:06, Valentin Schneider wrote: >> This flag was introduced in 2014 by commit >> >> d77b3ed5c9f8 ("sched: Add a new SD_SHARE_POWERDOMAIN for sched_domain") >> >> but AFAIA it was never leveraged by the scheduler. The closest thing I can >> think of is EAS caring about frequency domains, and it does that by >> leveraging performance domains. > > ... and even this was purely out of tree (SD_SHARE_CAP_STATES). > >> Remove the flag. >> >> Suggested-by: Morten Rasmussen >> Signed-off-by: Valentin Schneider >> --- >> arch/arm/kernel/topology.c | 2 +- >> include/linux/sched/sd_flags.h | 20 ++++++-------------- >> kernel/sched/topology.c | 10 +++------- >> 3 files changed, 10 insertions(+), 22 deletions(-) >> >> diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c >> index b5adaf744630..353f3ee660e4 100644 >> --- a/arch/arm/kernel/topology.c >> +++ b/arch/arm/kernel/topology.c >> @@ -243,7 +243,7 @@ void store_cpu_topology(unsigned int cpuid) >> >> static inline int cpu_corepower_flags(void) >> { >> - return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN; >> + return SD_SHARE_PKG_RESOURCES; >> } >> >> static struct sched_domain_topology_level arm_topology[] = { > > I guess with SD_SHARE_POWERDOMAIN gone, arch arm can even use the default_topology[]: That does look like it! I never noticed we declared this GMC topology level. Given it uses the thread_sibling mask, and that no (upstream) arm DT uses the thread topology binding, I guess that makes sense. > > diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c > index b5adaf744630..87dd193165cc 100644 > --- a/arch/arm/kernel/topology.c > +++ b/arch/arm/kernel/topology.c > @@ -241,20 +241,6 @@ void store_cpu_topology(unsigned int cpuid) > update_siblings_masks(cpuid); > } > > -static inline int cpu_corepower_flags(void) > -{ > - return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN; > -} > - > -static struct sched_domain_topology_level arm_topology[] = { > -#ifdef CONFIG_SCHED_MC > - { cpu_corepower_mask, cpu_corepower_flags, SD_INIT_NAME(GMC) }, > - { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) }, > -#endif > - { cpu_cpu_mask, SD_INIT_NAME(DIE) }, > - { NULL, }, > -}; > - > /* > * init_cpu_topology is called at boot when only one cpu is running > * which prevent simultaneous write access to cpu_topology array > @@ -265,7 +251,4 @@ void __init init_cpu_topology(void) > smp_wmb(); > > parse_dt_topology(); > - > - /* Set scheduler topology descriptor */ > - set_sched_topology(arm_topology); > }