From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuyang Du Subject: Re: [RFC PATCH] cpufreq: intel_pstate: Change the calculation of next pstate Date: Tue, 13 May 2014 05:59:56 +0800 Message-ID: <20140512215956.GC10676@intel.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga03.intel.com ([143.182.124.21]:16753 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751369AbaEMGEl (ORCPT ); Tue, 13 May 2014 02:04:41 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Stratos Karafotis Cc: "Rafael J. Wysocki" , Doug Smythies , " linux-pm@vger.kernel.org" , LKML , Dirk Brandewie , Dirk Brandewie , Viresh Kumar > > > Maybe, in some cases yes. But not always. > > > For example, please consider a CPU running a tight "for" loop in 100MHz > > > for a couple of seconds. This produces a load of 100%. > > > It will produce the same load (100%) in any other frequency. > > > > Still fundamentally wrong, because you are not making a fair > > comparison ("load" in 100MHz vs. any other freq). > > > > I'm sorry, I didn't understand you. What do you mean it's not fair? > > In the above example (considering a CPU with min freq 100MHz and max freq 1000Mhz) a load of 100% should also be 100 in other next frequency. > > If we scale the load we will calculate the load in 100Mhz to 10%. I believe that this is not true. The amount of work @100MHz is the same as the amount of work @1000MHZ, in your example? Put another way, your proposed method does not do any extra better, but do worse in other cases (what if @1000MHz, the load drops to 10%). That said, your case cannot be used against associating freq with load. That also said, by associating freq with load, we will finally get highest freq as well (in your case). Yuyang