From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juri Lelli Subject: Re: [PATCH] cpufreq: schedutil: Avoid missing updates for one-CPU policies Date: Wed, 23 May 2018 12:13:44 +0200 Message-ID: <20180523101344.GB30909@localhost.localdomain> References: <1672734.JYOlA1IWnU@aspire.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1672734.JYOlA1IWnU@aspire.rjw.lan> Sender: linux-kernel-owner@vger.kernel.org To: "Rafael J. Wysocki" Cc: Linux PM , LKML , Peter Zijlstra , Viresh Kumar , Joel Fernandes , Patrick Bellasi , claudio@evidence.eu.com, Todd Kjos List-Id: linux-pm@vger.kernel.org On 23/05/18 11:47, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Commit 152db033d775 (schedutil: Allow cpufreq requests to be made > even when kthread kicked) made changes to prevent utilization updates > from being discarded during processing a previous request, but it > left a small window in which that still can happen in the one-CPU > policy case. Namely, updates coming in after setting work_in_progress > in sugov_update_commit() and clearing it in sugov_work() will still > be dropped due to the work_in_progress check in sugov_update_single(). > > To close that window, rearrange the code so as to acquire the update > lock around the deferred update branch in sugov_update_single() > and drop the work_in_progress check from it. > > Signed-off-by: Rafael J. Wysocki I don't have a platform at hand where to test this. But, it looks OK to me. Reviewed-by: Juri Lelli Best, - Juri