Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1591371imm; Fri, 7 Sep 2018 02:58:24 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbt7Q0poOUetnLuxLMwh5WODb0Rwut8txSfoRVNGaW7BzH6pc/VE2HOAJhfCzUSE1bwra5B X-Received: by 2002:a62:1f11:: with SMTP id f17-v6mr7620773pff.168.1536314304760; Fri, 07 Sep 2018 02:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536314304; cv=none; d=google.com; s=arc-20160816; b=ht2c8kgUNJhc8OYc5u+y9EIRd4i7hI2zrgMJ0aBOawX04BlKwYj0Rkfp8h+1DmLaor L0+wiGnz535sMZYj9NmsBY3Ho+JBcyAcbQFVNxCgRoiEUSIBHU5Ev794VQv/mntT/q8l JEA6UCyfN8UQAiIarV7CCHdN7+gKQMVxbBc9oOYXXAf9EC8vywWpxBVx0uFYjpC8c4SV MvPxwlc8fY8/mDSwVUxjUav1t0J59NkOP05pVvpVwUtrCWzj8/ZSSUit5qcBsLiQrnSU kGXnpxzXKno/WTTXj0xHkJlvKtBM2Ik/h/NYkmAHG+ZIRpzkyM1TWGE6KNc39r7eLUhM PUnQ== 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=4LSSTEcox8VxBLMkq6V/IYYVJgM7Xwkk9fNDopNOLDs=; b=wCzlPQoA3V2fQbVNxDVNRrqjlsUquwXgnhBZx2S2usR81ffeDmzkOXPaB7mF+JpR+v j0M69SPkm7cBkL1nURerBqW/HmzX7K4VCsiXNOSKWjNmXRpcUxw5pdpUKXtBVOsvsvLc Xgat3TQiIbnizzqTAu1VjCRVWabk2GrzizDcR0PpTa9fZW4LPgTvP2OCcUZjd1h2AJrK hCGO8mQG3JaahFR+2/Bhc6p+e7/KSBGCbrnR5QjIsV73TKjX9L+Cx1A8+/nzHtzR6qmA NQkIrqzs9xiUAPk/HjN1wxyLPMpIYmuIik/aFKgu4FvR6mA+/IQziwwmrTqbmIGE/X+W 0qcw== 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 m13-v6si8155427pgk.251.2018.09.07.02.58.07; Fri, 07 Sep 2018 02:58:24 -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 S1728186AbeIGNmI (ORCPT + 99 others); Fri, 7 Sep 2018 09:42:08 -0400 Received: from foss.arm.com ([217.140.101.70]:57186 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727815AbeIGNmI (ORCPT ); Fri, 7 Sep 2018 09:42:08 -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 655627A9; Fri, 7 Sep 2018 02:02:10 -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 4B8F33F557; Fri, 7 Sep 2018 02:02:06 -0700 (PDT) Date: Fri, 7 Sep 2018 10:02:04 +0100 From: Quentin Perret To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Peter Zijlstra , Linux Kernel Mailing List , Linux PM , Greg Kroah-Hartman , Ingo Molnar , Dietmar Eggemann , Morten Rasmussen , Chris Redpath , Patrick Bellasi , Valentin Schneider , Vincent Guittot , Thara Gopinath , Viresh Kumar , Todd Kjos , Joel Fernandes , Steve Muckle , adharmap@codeaurora.org, Saravana Kannan , Pavan Kondeti , Juri Lelli , Eduardo Valentin , Srinivas Pandruvada , currojerez@riseup.net, Javi Merino Subject: Re: [PATCH v6 13/14] sched/topology: Make Energy Aware Scheduling depend on schedutil Message-ID: <20180907090202.6cmbm7wyr2uumkhu@queper01-lin> References: <20180820094420.26590-1-quentin.perret@arm.com> <20180906143842.xlxcg5notwdaflww@queper01-lin> <1545744.fI5ZvP8FO0@aspire.rjw.lan> <4111046.18AB1cFGcU@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4111046.18AB1cFGcU@aspire.rjw.lan> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 07 Sep 2018 at 10:56:12 (+0200), Rafael J. Wysocki wrote: > On Friday, September 7, 2018 10:52:01 AM CEST Rafael J. Wysocki wrote: > > On Thursday, September 6, 2018 4:38:44 PM CEST Quentin Perret wrote: > > > Hi Rafael, > > > > > > On Thursday 06 Sep 2018 at 11:18:55 (+0200), Rafael J. Wysocki wrote: > > > > I'm not a particular fan of notifiers to be honest and you don't need > > > > to add an extra chain just in order to be able to register a callback > > > > from a single user. > > > > > > Right. I agree there are alternatives to using notifiers. I used them > > > because they're existing infrastructure, and because they let me do what > > > I want without too much troubles, which are two important points. > > > > > > > That can be achieved with a single callback > > > > pointer too, but also you could just call a function exported by the > > > > scheduler directly from where in the cpufreq code it needs to be > > > > called. > > > > > > Are you thinking about something comparable to what is done in > > > cpufreq_add_update_util_hook() (kernel/sched/cpufreq.c) for example ? > > > That would probably have the same drawback as my current implementation, > > > that is that the scheduler is notified of _all_ governor changes, not > > > only changes to/from sugov although this is the only thing we care about > > > for EAS. > > > > Well, why don't you implement it as something like "if the governor changes > > from sugov to something else (or the other way around), call this function > > from the scheduler"? Yes that work too ... > That said, governors are stopped and started in a few cases other than just > changing the governor, so maybe you want the EAS side to be notified whenever > sugov is stopped and started after all? Right, so sugov_start/sugov_stop could be an option in this case ... And that would leave the CPUFreq core untouched. I'll try to write something :-) Thanks, Quentin