Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp494753imm; Wed, 20 Jun 2018 01:37:49 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK7VVDR/YxvVp5ShUUgiq99R+tQ+9yPIBoFqhiL17vAvk4Sa+Rcir3HnRsLKBPlaZ78EPL5 X-Received: by 2002:a62:c16:: with SMTP id u22-v6mr21594437pfi.177.1529483869729; Wed, 20 Jun 2018 01:37:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529483869; cv=none; d=google.com; s=arc-20160816; b=dOQAT95MWd107AcYKVNgvIQhC0szAsYYEcaIKHM2pjarRtkuHYAnFseyQyKw5BnAkr C7QHkFafzz6620JdltCduxMXVmZRSjyrfwKilM/Xs6TdU7Qc2XotF+qSc+Fsz6mY18it PELrUHt3gDJwkiQj32a7EvzidMC3DCC2K8t4CGxFRn9DzR2MuQ9Ipqzov/xsrd1+8m+V SqGuwwhyxfF2dHcqAIHI4M/MvAooZPFeft+xqE+i3VCIvWR76fIAKP/Z79r4NIbHo2/y cEDqDUDVEdRpyCegn4WWPWzfLVqVNUi+va/Fd8kf5obnJojF2SZsLhHUJV0OY+FKmVHL t2kw== 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=xX5AIDtBJ3foG3fEcbcTRWI/JNG9Vg4BcXz+rbzlde4=; b=CPJJ5TcxF8A7cVkFfdoRQMQzBRyG7LJEPhs8m+0ZUFPkIecVbI26gvT4UJQ5bKCB91 Udd+L6aYvR8n5i6ZWlt4vMNv/Vx0XB1Wmt95Qu/GE8p0dSRvqfM139J+UmOnkfVoaF3E TWk7RN4raiSGiC/lUabA7TaNRy1LCiW7HPBK0/axFu7bkVP5zTzCn+KtVZ2JbwuJh2tr D61+Nzdqu/Ik9N9IpXFLoaOC+06Ov84He4C/UOviA3YuO76gaCGngnPx3mPu0tS18oDw Myag4L1hNe/UCLBv/joTv2IFkgzxUvG9gY7+V6dQh3Lkt+YthkxVjp1SQgdhGgSAc8jb rSLA== 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 a73-v6si1919443pfl.349.2018.06.20.01.37.35; Wed, 20 Jun 2018 01:37:49 -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 S1754696AbeFTIge (ORCPT + 99 others); Wed, 20 Jun 2018 04:36:34 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33244 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753906AbeFTIgb (ORCPT ); Wed, 20 Jun 2018 04:36:31 -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 CA93F80D; Wed, 20 Jun 2018 00:58:18 -0700 (PDT) Received: from e108498-lin.cambridge.arm.com (e108498-lin.cambridge.arm.com [10.1.211.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D72F63F246; Wed, 20 Jun 2018 00:58:14 -0700 (PDT) Date: Wed, 20 Jun 2018 08:58:09 +0100 From: Quentin Perret To: Peter Zijlstra Cc: rjw@rjwysocki.net, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, mingo@redhat.com, dietmar.eggemann@arm.com, morten.rasmussen@arm.com, chris.redpath@arm.com, patrick.bellasi@arm.com, valentin.schneider@arm.com, vincent.guittot@linaro.org, thara.gopinath@linaro.org, viresh.kumar@linaro.org, tkjos@google.com, joelaf@google.com, smuckle@google.com, adharmap@quicinc.com, skannan@quicinc.com, pkondeti@codeaurora.org, juri.lelli@redhat.com, edubezval@gmail.com, srinivas.pandruvada@linux.intel.com, currojerez@riseup.net, javi.merino@kernel.org Subject: Re: [RFC PATCH v3 05/10] sched/topology: Reference the Energy Model of CPUs when available Message-ID: <20180620075809.GA23168@e108498-lin.cambridge.arm.com> References: <20180521142505.6522-1-quentin.perret@arm.com> <20180521142505.6522-6-quentin.perret@arm.com> <20180619122632.GS2458@hirez.programming.kicks-ass.net> <20180619132449.GA17720@e108498-lin.cambridge.arm.com> <20180619162042.GT2458@hirez.programming.kicks-ass.net> <20180619171316.GB29374@e108498-lin.cambridge.arm.com> <20180619184250.GF2494@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180619184250.GF2494@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 19 Jun 2018 at 20:42:50 (+0200), Peter Zijlstra wrote: > On Tue, Jun 19, 2018 at 06:13:17PM +0100, Quentin Perret wrote: > > Would replacing the static_key by a flag attached to the root_domain be > > reasonable ? > > Keep the static key as is, enable if any root domain needs it. OK. So basically the semantics of the static key becomes: it is set if at least one root domain has a non-empty list of freq domains. And a root_domain has a non-empty list of frequency domains if it meets all conditions for EAS (SD_ASYM_CPUCAPACITY flag set, low complexity for the "portion" of the EM covering it, ...) And then, checking the status of the list (empty or not) for a specific root domain can replace my flag I guess. I'll need to check that somewhere around select_task_rq_fair() in addition to the check on the static key to decide if a task can go in find_energy_efficient_cpu(). > > Sorry but I didn't understand that ... > > If you have only a single freq-domain, there is nothing to do, right? Ah, right. Since we already agreed that all CPUs in a freq domain must have the same micro-arch, that's correct. Checking the presence of the SD_ASYM_CPUCAPACITY flag should cover this case I guess. Thanks, Quentin