Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752411AbcKRDXr (ORCPT ); Thu, 17 Nov 2016 22:23:47 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35218 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752079AbcKRDXo (ORCPT ); Thu, 17 Nov 2016 22:23:44 -0500 Date: Fri, 18 Nov 2016 08:45:05 +0530 From: Viresh Kumar To: Stratos Karafotis Cc: "Rafael J. Wysocki" , "Srivatsa S. Bhat" , "linux-pm@vger.kernel.org" , LKML Subject: Re: [RFC][PATCH] cpufreq: governor: Change the calculation of load for deferred updates Message-ID: <20161118031504.GC3110@vireshk-i7> References: <4f7f7d9e-4b6b-a9f8-bf54-a6d99bd952c6@semaphore.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f7f7d9e-4b6b-a9f8-bf54-a6d99bd952c6@semaphore.gr> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 929 Lines: 27 On 17-11-16, 21:54, Stratos Karafotis wrote: > Commit 18b46abd0009 ("cpufreq: governor: Be friendly towards latency- > sensitive bursty workloads"), introduced a method to copy the calculated > load from the previous sampling period in case of a deferred timer > (update). > > This helps on bursty workloads but generally coping the load for the > previous measurement could be arbitrary, because of the possibly different > nature of the new workload. > > Instead of coping the load from the previous period we can calculate the > load considering that between the two samples, the busy time is comparable > to one sampling period. Thus: > > busy = time_elapsed - idle_time > > and > > load = 100 * busy / sampling_rate; > > Also, remove the 'unlikely' hint because it seems that a deferred update > is a very common case on most modern systems. You have any numbers to prove that this improves something ? -- viresh