Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1260239imm; Tue, 2 Oct 2018 05:34:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV63doxyZ+PmHAP0N+3d+S6oathQv8e8ZVNm5G93JReoS06CukL6OfVODs4Rm8jdZee6bH5/N X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr16791933plt.268.1538483692701; Tue, 02 Oct 2018 05:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538483692; cv=none; d=google.com; s=arc-20160816; b=axFnEZw8mwQmGr95RwZnQQt6WiWuxS/HYbmg3iky8VOk5SmzR3Euzo+MHaUF3aLYPW rH6aAqPK0l2gvO8mCJGsEEd3psbWY+KatoGZUgp3Ovkr4LwV7VeCz1mSVIW3liUfbXCE DzZm9iG74hJAEAZ3YBMUqs5UWxxeinvS03rytR8b6S/2XpdOR8ksvoNSk/93R4ROtuPR DTW6d5g9Jdz4k1FLAEj3p3XewcJ9RmouwAYu8jDCsQk5KSPzwqBAF+XGnrvH2s6M/ZYq 9qZCF99XJpYlgo/9s8nXd93gD5EsdQijRIncSssJ3NzVv2UzKryCc7NhDZTsW/hsTa+4 TIxw== 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:dkim-signature; bh=Di9uCSjiF6Qk5dAEgQHHHJdT0GY25KcK7saRgYTxwc8=; b=gLbG70ubNK3ig0alEXsI6TjqTFfpLoGzYqeQga5m2SitigT9THy4mDLFx3KA1U2E2a p1m1GKFK1StHymGqQKsYJ5dHtMXgJOk+qLkRF8yWOKqdPI3+rTtWczVKj7zvm7R1usUL BWKDWVAKWwmZwqaIzViXUXKZ53Zps5Yt9u+zF3YWbsqpLGxRRfJ9hwHiiFFXyM4iAKAJ 4u2n4m/xptoSrQhl9uhsWgnL41fxmQvLjPucsy61Q3hWo/I9taJxnhm9g2wJYk/pL+D1 XFDT/WlgnHw1giCMYAPakF8EylqXPP6YgRtYEx2zDAPj7Vj5JCCjYeioNcB1Y6OZx/nk sVMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p985S903; 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 p12-v6si15750122pfj.244.2018.10.02.05.34.37; Tue, 02 Oct 2018 05:34:52 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=p985S903; 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 S1727747AbeJBTRf (ORCPT + 99 others); Tue, 2 Oct 2018 15:17:35 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57508 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727555AbeJBTRf (ORCPT ); Tue, 2 Oct 2018 15:17:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Di9uCSjiF6Qk5dAEgQHHHJdT0GY25KcK7saRgYTxwc8=; b=p985S9031mrV3r0oh+EqWLkqi gWjydpxoZww/7NQS9AGCPndOQATIQtHjbswleO7RGiKG4dNvX97RNwzsKo3fmfJlhQyPfDEEqHkJP i0s21rj1VIrCWa09ZsMpG6AsFFrWL7vlToXHChSmfQezhmcOiZYxDEijP7dGLb9Ya3KDQH9fW0CtT wJWOeK27G2kcnC1FtXRsb0KeQiVXaepJEbSMgSGeXVyDy6Ot+2S4rJAwxo2s/qmqR3jWBdJE0BeGP 1xA8T/LikdWzvgUL8hcbQnUeaBEFjIWgTVTugjGqNEY8ngf4iNtJL3QULjlv3OGGGpbOBzipJpGwh Or/7Wyy1Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7JsY-0006MO-3J; Tue, 02 Oct 2018 12:34:18 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3C94F2025A349; Tue, 2 Oct 2018 14:34:16 +0200 (CEST) Date: Tue, 2 Oct 2018 14:34:16 +0200 From: Peter Zijlstra To: Quentin Perret Cc: 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, patrick.bellasi@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 v7 05/14] sched: Introduce a sched_feat for Energy Aware Scheduling Message-ID: <20181002123416.GA3439@hirez.programming.kicks-ass.net> References: <20180912091309.7551-1-quentin.perret@arm.com> <20180912091309.7551-6-quentin.perret@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180912091309.7551-6-quentin.perret@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 12, 2018 at 10:13:00AM +0100, Quentin Perret wrote: > In order to make sure Energy Aware Scheduling (EAS) doesn't hurt > systems not using it, add a new sched_feat, called ENERGY_AWARE, > guarding the access to EAS code paths. > > Signed-off-by: Quentin Perret > --- > kernel/sched/features.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/kernel/sched/features.h b/kernel/sched/features.h > index 85ae8488039c..26ff6752e492 100644 > --- a/kernel/sched/features.h > +++ b/kernel/sched/features.h > @@ -90,3 +90,10 @@ SCHED_FEAT(WA_BIAS, true) > * UtilEstimation. Use estimated CPU utilization. > */ > SCHED_FEAT(UTIL_EST, true) > + > +/* > + * Energy-Aware Scheduling. Whether or not tasks will be placed into an > + * energy-aware fashion depends on this feature being enabled and on the > + * root domain having an Energy Model attached. > + */ > +SCHED_FEAT(ENERGY_AWARE, false) So these are debug knobs.. I would expect there to be a regular static_key that is controlled by the presence of EM data. Remember, if you compile with SCHED_DEBUG=n, this becomes a compile time constant: false, and the compiler gets to do lots of DCE.