From mboxrd@z Thu Jan 1 00:00:00 1970 From: Quentin Perret Subject: Re: [PATCH v6 13/14] sched/topology: Make Energy Aware Scheduling depend on schedutil Date: Fri, 7 Sep 2018 10:02:04 +0100 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 Return-path: Content-Disposition: inline In-Reply-To: <4111046.18AB1cFGcU@aspire.rjw.lan> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-pm@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