Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp876685imm; Thu, 4 Oct 2018 04:59:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV61U4fANk9TnBFo3QNW1rBY1y6qbz72su9DTeYmiWkT4DeI79tn5GKlgJsrMc6trJGF0XpTV X-Received: by 2002:a63:450b:: with SMTP id s11-v6mr5557354pga.301.1538654353649; Thu, 04 Oct 2018 04:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538654353; cv=none; d=google.com; s=arc-20160816; b=sgOSi2IDV/EQhkbDwatPBlLRZmoN1Qn9kn0etId/K5TIYu9t6N+HWpr1+NueANWJb1 p22+jgJW7MW/deaQ9qDnmHPIbTS9CVB59RGhr0dSZXoz3e+Ah07Nhe+5IY0WXYvcT/Ip gZGxRuIvjvggMP02xGap+f6ZleRpCJ1UshxbUa7aJjY3YfpCE0lTDWqj84jnxgyzY09y IrFDA4nf1NCZXT6XFJdj28uzCYgduSnFLgtvousv7V2+u5rleUhOegMW7/lhfzo8je9R k3+/gP1nVyNSwleZtCDj2g+GQ01N4Mfu/GdlG4IYZBYqntjyZ4ucxK7iwHvpXdH4sN7V /cdw== 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; bh=aCYvW8xeNFklHLUctEexrzh7epPxbxPcldQ0m7AIvxc=; b=qZLGNvdYKrTI8EnJh9BHz3vKv7d+3k5sp/2rhF+na5uD/kOdNuO5sp3vUBhTBZ0nsq JMuplqYUmsgwQwwEoYhXGo1q19pQmVKnr2XT9DP8TXuJFl0lDsI9X5z/GF7ac4xKIrgF 4yGD6xx53zsky4mneD2hnmrKUzPchwPPESegaW6C2T9Eun5lYpxuj93HE3LUJQSfwhrj JauboIGrzUnH7dJ0Cq82TRafvl2bhwzMwNDg+pYGCLosm7fXVY83hCy/bmMCY9uiO4Z3 w+JPTKNai/zmh+tYb/AUmDEGup4qBA+AirDqtc+KdgFmBbfQ582xj/AfUbxn2O0jmK5r 5rMg== 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 e13-v6si4043637pge.0.2018.10.04.04.58.57; Thu, 04 Oct 2018 04:59:13 -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 S1727474AbeJDSvo (ORCPT + 99 others); Thu, 4 Oct 2018 14:51:44 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:35310 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727256AbeJDSvo (ORCPT ); Thu, 4 Oct 2018 14:51:44 -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 E43AE7A9; Thu, 4 Oct 2018 04:58:46 -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 C73793F5A0; Thu, 4 Oct 2018 04:58:42 -0700 (PDT) Date: Thu, 4 Oct 2018 12:58:41 +0100 From: Quentin Perret To: Peter Zijlstra 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 13/14] sched/topology: Make Energy Aware Scheduling depend on schedutil Message-ID: <20181004115839.c5g2fsehszbvwoqq@queper01-lin> References: <20180912091309.7551-1-quentin.perret@arm.com> <20180912091309.7551-14-quentin.perret@arm.com> <20181004105023.GE19252@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181004105023.GE19252@hirez.programming.kicks-ass.net> 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 04 Oct 2018 at 12:50:23 (+0200), Peter Zijlstra wrote: > On Wed, Sep 12, 2018 at 10:13:08AM +0100, Quentin Perret wrote: > > Energy Aware Scheduling (EAS) is designed with the assumption that > > frequencies of CPUs follow their utilization value. When using a CPUFreq > > governor other than schedutil, the chances of this assumption being true > > are small, if any. When schedutil is being used, EAS' predictions are at > > least consistent with the frequency requests. Although those requests > > have no guarantees to be honored by the hardware, they should at least > > guide DVFS in the right direction and provide some hope in regards to the > > EAS model being accurate. > > > > To make sure EAS is only used in a sane configuration, create a strong > > dependency on schedutil being used. Since having sugov compiled-in does > > not provide that guarantee, make CPUFreq call a scheduler function on > > on governor changes hence letting it rebuild the scheduling domains, > > check the governors of the online CPUs, and enable/disable EAS > > accordingly. > > So this patch disables EAS when we change cpufreq gov. How about we > force select schedutil and disallow changing it when EAS is enabled? > > Instead of silently disabling EAS when we frob the governor? By doing it this way I think we have a better integration with things like that exclusive cpusets. In the end, EAS is enabled in a per-root_domain basis. So, say you have two root domains, A and B. EAS is enabled on A and disabled on B (because it doesn't have SD_ASYM_CPUCAPACITY or something). Should you be forced to use sugov on the CPUs of B to run EAS on A ? If there is a cpufreq policy covering only the CPUs of B, I'd say probably no. Now I get the argument that this is happening silently as-is, so we can do better. How about we put a message in dmesg we EAS gets disabled in case of governor changes ? Also, I'm currently working on a doc patch for EAS ATM (to be posted soon), so I can (and will) make it very clear there that you _must_ use sugov to use EAS. Would that work ? Thanks, Quentin