From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Kaehlcke Subject: Re: [PATCH 4/4] PM / devfreq: Handle monitor start/stop in the devfreq core Date: Thu, 14 Feb 2019 11:28:55 -0800 Message-ID: <20190214192855.GD117604@google.com> References: <20190214013042.254790-1-mka@chromium.org> <20190214013042.254790-5-mka@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Chanwoo Choi Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Thierry Reding , Jonathan Hunter , Linux PM list , linux-kernel , linux-tegra@vger.kernel.org, Lukasz Luba List-Id: linux-pm@vger.kernel.org Hi Chanwoo, On Thu, Feb 14, 2019 at 11:17:36PM +0900, Chanwoo Choi wrote: > Hi Matthias, > > As I commented on the first patch, it is not possible to call some codes > according to the intention of each governor between 'devfreq_moniotr_*()' > and some codes which are executed before or after 'devfreq_moniotr_*()' > > For example, if some governor requires the following sequence, > after this patch, it is not possible. > > case DEVFREQ_GOV_xxx: > /* execute some code before devfreq_monitor_xxx() */ > devfreq_monitor_xxx() > /* execute some code after devfreq_monitor_xxx() */ As for the suspend/resume case I agree that the patch introduces this limitation, but I'm not convinced that this is an actual problem. For governor_start(): why can't the governor execute the code before polling started, does it make any difference to the governor that a work is scheduled? For governor_stop(): why would the governor require polling to be active during stop? If it needs update_devfreq() to run (called by devfreq_monitor()) it can call it directly, instead of waiting for the monitor to run at some later time. Cheers Matthias