Received: by 10.213.65.68 with SMTP id h4csp592480imn; Wed, 28 Mar 2018 09:07:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx49+9y5eUcTuqh5SxPGGSHq3nmxun1Xs3myG+LYZeDr6ghmRWDKrCHhHT9+qlng8Y3fqvr28 X-Received: by 2002:a17:902:57d2:: with SMTP id g18-v6mr4382021plj.381.1522253240609; Wed, 28 Mar 2018 09:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522253240; cv=none; d=google.com; s=arc-20160816; b=idrdNyABKg0rHzAAJU4lV+PpbfnsAX8FvpXq/24/de18i3GH51XWd0+2inQeJ0L3U8 z2Yh0FQTJfr/seDLeGdsm8kJy/mS5WmgcjSKaXab6FWopdviwBC4XDfBN1LOyrdRJbDr zAdZnAgWU89bey6hs/UM+7z5oyYpFZopQ52hitT+Vxy/+3thBWGyueXuPkjHIXmXXPbY gADs0IKDgm/vUyj0D6EyYnfczqg3D10UpZ+7OJyD0eitHaM+ibD7gTnbyAoFFM+h7tKZ L+3CKCfMO+Q55W3X3lIaoY18cuW5ihLYaWA4E2Mx8wD20keFwm+6PPich/GLZkHVRtQP Jx4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=eE7weYysYvgbrAo9C00NnBgdAmpNxLh8be48ZZ1NMrE=; b=NHNMLKLzZ5TLat+3vmSEKZsumjKbr55iwuIMVEpaClY2dmdWFZm1/bVnRlW1rLqu+3 lSZByu1BWW07MJ3IybRgpKnu1L/Bw8O1PdjPbIffp2VboKKCch/1oicPdvGzH+0z257G DCBxDVy8CjNGeA2rXGRn1ZhcZ54RmW5kFQPnpj30acpb0MkXR/BlGjhqpmvgrB20sPSf bsWQQfs1HMsU3jKz51/yBbqSLjIQdSqwhHzp8pV0gkfsbtxAcNYDmcSTkyvdeaDl7bu8 NR7rp0zBKrjPPvSIsVT4GXP8zg9NYonA/BEoJI0Lnm9VbwzslbG1bYD2FzVtC0c1TYsP MJIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=koopMFVm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18si3087004pfl.100.2018.03.28.09.07.06; Wed, 28 Mar 2018 09:07:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=koopMFVm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753593AbeC1ODB (ORCPT + 99 others); Wed, 28 Mar 2018 10:03:01 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:41288 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753577AbeC1OC7 (ORCPT ); Wed, 28 Mar 2018 10:02:59 -0400 Received: by mail-io0-f194.google.com with SMTP id m83so3666349ioi.8 for ; Wed, 28 Mar 2018 07:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=eE7weYysYvgbrAo9C00NnBgdAmpNxLh8be48ZZ1NMrE=; b=koopMFVmcAJoo2QAF0QImO5G80XWJNBEC/f5I9ojCXkzpGml5omRrSBz+8JNIBd0Hf L1Yl0DPDi4RZWrgrOuQ5m1lhJqOF/+eiPle/jCBMwhjnKFWZgWptvvpbZ2Q28av4mmjj ryjfCe+pfWVIbllPajBSmtgGOFDQV13k9du7g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=eE7weYysYvgbrAo9C00NnBgdAmpNxLh8be48ZZ1NMrE=; b=OTPs2l+Le2v/oEzZdLy0iapt6Z5BdSuIx5iJofsuf6nZR2F2P2LyZkl3NBXWO/T97s V/kT+pqHM3it0/SiejKMoFg6cyc3OuC2VGwj6byqKfttgez7p1MVxyeAkezkujVRgeFI F84nctf63ybQNzl+J1a8FM3eln+x7SQ5hulFiLbx0KqJSNzTEK0Gz/hYjcasr9O9X4OA me7Bbevx/OkvoyybnGxDK+FmY+elUgowH5R/1EC86F+u3SQMoXv0re9Lpp0sQvIGIjVy 3bI1jZpR0B5a7mQT5VvaESe3DKbQbZ8sy0qF52Zh64riqUAkVR0JMK/WF+38dCKzt3+w ssmQ== X-Gm-Message-State: AElRT7EdJ1d/LGH4UJT9kb6nUZ6zDfAO/9RifBoBhHRLqlBArVbSOcnQ cZvdw8/Zcvc5cIK4ue4F0yacJ/SNLYNXZYODBOPUtg== X-Received: by 10.107.174.102 with SMTP id x99mr21186057ioe.18.1522245778451; Wed, 28 Mar 2018 07:02:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.222.20 with HTTP; Wed, 28 Mar 2018 07:02:38 -0700 (PDT) In-Reply-To: <20180328091226.GD28871@arm.com> References: <1522223215-23524-1-git-send-email-vincent.guittot@linaro.org> <20180328091226.GD28871@arm.com> From: Vincent Guittot Date: Wed, 28 Mar 2018 16:02:38 +0200 Message-ID: Subject: Re: [PATCH] sched: support dynamiQ cluster To: Will Deacon Cc: Catalin Marinas , LAK , linux-kernel , Peter Zijlstra , Dietmar Eggemann , Morten Rasmussen , Chris Redpath Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28 March 2018 at 11:12, Will Deacon wrote: > On Wed, Mar 28, 2018 at 09:46:55AM +0200, Vincent Guittot wrote: >> >> The SD_ASYM_PACKING flag is disabled by default and I'm preparing another patch >> to enable this dynamically at boot time by detecting the system topology. >> >> arch/arm64/kernel/topology.c | 30 ++++++++++++++++++++++++++++++ >> 1 file changed, 30 insertions(+) >> >> diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c >> index 2186853..cb6705e5 100644 >> --- a/arch/arm64/kernel/topology.c >> +++ b/arch/arm64/kernel/topology.c >> @@ -296,6 +296,33 @@ static void __init reset_cpu_topology(void) >> } >> } >> >> +#ifdef CONFIG_SCHED_MC >> +unsigned int __read_mostly arm64_sched_asym_enabled; >> + >> +int arch_asym_cpu_priority(int cpu) >> +{ >> + return topology_get_cpu_scale(NULL, cpu); >> +} >> + >> +static inline int arm64_sched_dynamiq(void) >> +{ >> + return arm64_sched_asym_enabled ? SD_ASYM_PACKING : 0; >> +} >> + >> +static int arm64_core_flags(void) >> +{ >> + return cpu_core_flags() | arm64_sched_dynamiq(); >> +} >> +#endif >> + >> +static struct sched_domain_topology_level arm64_topology[] = { >> +#ifdef CONFIG_SCHED_MC >> + { cpu_coregroup_mask, arm64_core_flags, SD_INIT_NAME(MC) }, > > Maybe stick this in a macro to avoid the double #ifdef? ok, I will do that in next version Vincent > > Will