Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1543672imm; Fri, 7 Sep 2018 02:00:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZDl+QuPrXGjJ9nDgdDLqVBH4EAKYOtn+A22hTF6SxSdlxJSVzREiVASnW+PbWKHEYFU2in X-Received: by 2002:a63:8442:: with SMTP id k63-v6mr7097078pgd.388.1536310837600; Fri, 07 Sep 2018 02:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536310837; cv=none; d=google.com; s=arc-20160816; b=QX46I8rEIPGvkLvjqC1DwSOjrRWKHcgE9gOL6zxl2/rMsvGuBekyD9cI25YafpxGnx AfualgBboJ/Ud+S7pKviaDTXU/rk7Rhux/xCKGvwneodhtcU1KWuzenBunXxevJ0EVq6 T6XysuZcOalRWku3qW2+0X94S77EJrYoC3IbI3V0/SErA1/u2ZNaWCfQ6/A1tfVyKrDx OB/Z2KwqjIWx+QMKxtGcqSg8fgicXRgKM+f5dYptIbIRrC2aMYuLGE0OPV8beDTkNfO+ 5OenTnWVt8AbdBoQqyb83CzyeCYoBguftAaH/rIBI1qop2Ofg6m6tPmZJ8lpNP6lNL5t PfdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rBotkeEbmXI8lbBsuEWcFGLQ8lq7BDv7SBnZ7BTJKEk=; b=idhuSa8F72G5JRKijdLyRJephg2wDIP/mEWlsNVC6FK1qbeQ5SveebZHZnG/Lka3tj DYYoOxNIFFAQcKGH5zs4z8B932ydEyG0beamY4NwpoYwz6y4KdhLSJcpJ1vrUp5yleZN dHdof+U+rfygfi9EKj4XvnULNgDUqievVS4OiOfMYLy2mRam41TB+f7VoT0mEnjEmgMR nKItn1HYCwn80p/Uc92KYTuAVMfHeVi/xgtvkyg2zCJmyjcs0SEGPlp3TcGqIPzIdtX0 wAOJZsLlvxsA3r3BD+crQq7q9JCOIiLI0CcZO0FkhNLKPOC06uye8wHRwigMpxZDpRZj XijA== 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 i33-v6si7794133pld.306.2018.09.07.02.00.22; Fri, 07 Sep 2018 02:00:37 -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 S1728207AbeIGNip (ORCPT + 99 others); Fri, 7 Sep 2018 09:38:45 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:49675 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727529AbeIGNio (ORCPT ); Fri, 7 Sep 2018 09:38:44 -0400 Received: from 79.184.254.186.ipv4.supernova.orange.pl (79.184.254.186) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.123) id 0f8cfcde9a2521a0; Fri, 7 Sep 2018 10:58:45 +0200 From: "Rafael J. Wysocki" To: Quentin Perret 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 Date: Fri, 07 Sep 2018 10:56:12 +0200 Message-ID: <4111046.18AB1cFGcU@aspire.rjw.lan> In-Reply-To: <1545744.fI5ZvP8FO0@aspire.rjw.lan> References: <20180820094420.26590-1-quentin.perret@arm.com> <20180906143842.xlxcg5notwdaflww@queper01-lin> <1545744.fI5ZvP8FO0@aspire.rjw.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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"? 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?