Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp477543imm; Thu, 30 Aug 2018 03:48:55 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdas/8F0XjWgu5gN00jZEtZIhKIzxmXmrWvgl98KSp9bfnFQTGKU5BLPUu4wk4+bcJOYLO8i X-Received: by 2002:a63:3089:: with SMTP id w131-v6mr9067254pgw.79.1535626135618; Thu, 30 Aug 2018 03:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535626135; cv=none; d=google.com; s=arc-20160816; b=hf7ewZeFlf0S/PqBQbSL+2vT85S5fTj52RcipPDwg4bWHlfFrv8CULMAlIrnQ2hCSx I15LgqkfuQjg30scrZrL0qQlcEP72rxZXTmN0ZEMtMWQGnMoZGyOnSEENsgvIcGNcYp1 xNIntNKS8aCNsqr3gMrVidEC1skxrJrEVH1TpTGuS6G88vQ7tl4fWrTuR9W9XvNZ4SRW pIBDUpujItjQ+T+ayOM3VpqAotlYkLSPwAThXY+H7uGcC9uPCXbcWGlXJx8IYZ6A5lBo QVP5oVHLQKCQZrYRmITX0jDBVNX+FEFbK/GEIktaXPmnvb26WdkV6taUpKR5bgWwpQz+ LGqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=BUK/jk6qPvnDBOT/a/aco8yr3YwgfETVtOcIZxpZvxE=; b=YIAbbiT5kL/535kNLUtJdm3qo2VciE0DevMM61CeYXJcfM+FTF5vUcPDt7W9ivDa5C aano6EFveTy0AlOcMPOVzJlQLFAUbASgULT6CoNTKkajS8j1iNhU59BvAY0UHq2rbn3W Ux7iupU7wocPr8cAOB+Q2+xFKKBNkBIkW7w/FHlS8JTbdr3hcbWQfUCwJ7O79B30F3y9 8+80lzjc3Kl0N2ztot9WfxPKVJNuelbuH+5FNvMg4XVgFsIYKHoqpWhQb4B0BLE/rpPW G75z2LJLDUObS6inpxPS00D+BCIWaH2djrqVou3KXMKrxkYU3+f8tgtRIbFLaGiDv/1y P9RQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l13-v6si6200828pgr.291.2018.08.30.03.48.40; Thu, 30 Aug 2018 03:48:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728500AbeH3Os6 (ORCPT + 99 others); Thu, 30 Aug 2018 10:48:58 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39386 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728318AbeH3Os6 (ORCPT ); Thu, 30 Aug 2018 10:48:58 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8559280D; Thu, 30 Aug 2018 03:47:26 -0700 (PDT) Received: from queper01-lin (queper01-lin.emea.arm.com [10.4.13.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9034D3F721; Thu, 30 Aug 2018 03:47:22 -0700 (PDT) Date: Thu, 30 Aug 2018 11:47:21 +0100 From: Quentin Perret To: Patrick Bellasi Cc: peterz@infradead.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, gregkh@linuxfoundation.org, mingo@redhat.com, dietmar.eggemann@arm.com, morten.rasmussen@arm.com, chris.redpath@arm.com, valentin.schneider@arm.com, vincent.guittot@linaro.org, thara.gopinath@linaro.org, viresh.kumar@linaro.org, tkjos@google.com, joel@joelfernandes.org, smuckle@google.com, adharmap@codeaurora.org, skannan@codeaurora.org, pkondeti@codeaurora.org, juri.lelli@redhat.com, edubezval@gmail.com, srinivas.pandruvada@linux.intel.com, currojerez@riseup.net, javi.merino@kernel.org Subject: Re: [PATCH v6 05/14] sched/topology: Reference the Energy Model of CPUs when available Message-ID: <20180830104718.lvkkhyi3dtwkfjr7@queper01-lin> References: <20180820094420.26590-1-quentin.perret@arm.com> <20180820094420.26590-6-quentin.perret@arm.com> <20180829162238.GQ2960@e110439-lin> <20180829165603.astg32z3ep2qldfu@queper01-lin> <20180830100019.GT2960@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180830100019.GT2960@e110439-lin> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 30 Aug 2018 at 11:00:20 (+0100), Patrick Bellasi wrote: > Dunno... but, in any case, probably we don't care about using EAS until > the boot complete, isn't it? So, as of now, EAS will typically start soon after CPUFreq. I don't see a point in starting before, and I'm not sure if starting it later is really what we want either ... It probably makes sense to start the DVFS-related features (CPUFreq, EAS, ...) together. > Just to better understand, what is the most common activation path we expect ? > > 1. system boot > 2. CPUs online > 3. CPUFreq initialization > 4. EM registered > X. ??? X is sort of arch dependent (like the EM registration actually). For arm/arm64, the arch topology driver (see drivers/base/arch_topology.c) will rebuild the sched_domains once the capacities of CPU are discovered. In previous versions, I had a patch that did that explicitly: https://lore.kernel.org/lkml/20180724122521.22109-14-quentin.perret@arm.com/ However, I dropped this patch for v6 because I rebased the series on top of Morten's automatic flag detection patches, which happen to already do that for me. More precisely, Morten's patches will rebuild the sched domains if the SD_ASYM_CPUCAPACITY flag needs to be set somewhere in the hierarchy. EAS depends on this flag anyway, so I guess it's fine to rely on this rebuild to start EAS at the same time. I have been wondering for a while if such a 'loose' way of starting EAS was alright or not. My conclusion was that it should be OK for now, because that should suit all the users I can see in the short/medium term. An alternative could be to introduce something like a notifier in the EM framework in order to let other subsystems know that the EM is complete or something along those lines. And then we could register a callback on this notifier to rebuild the sched_domains. But that's added complexity, which isn't really needed (yet). If that needs to be done to accomodate the needs of new users/archs, we can still implement that later :-) > N. partition_sched_domains > build_perf_domains > > IOW, who do we expect to call build_perf_domains for the first time ? On arm/arm64, when the arch_topology driver calls rebuild_sched_domains. Thanks ! Quentin