From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kasagar, Srinidhi" Subject: Re: [PATCH v7] cpufreq: Add SFI based cpufreq driver support Date: Thu, 18 Dec 2014 12:14:14 +0530 Message-ID: <20141218064414.GA18689@intel-desktop> References: <20141211081438.GA2885@intel-desktop> <20141216102444.GA16158@intel-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga09.intel.com ([134.134.136.24]:56823 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbaLRGmt (ORCPT ); Thu, 18 Dec 2014 01:42:49 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Len Brown Cc: "Rafael J. Wysocki" , "Brown, Len" , Viresh Kumar , Linux PM list , vishwesh.m.rudramuni@intel.com, srinidhi.kasagar@intel.com On Wed, Dec 17, 2014 at 05:12:43PM -0500, Len Brown wrote: > >> policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; > > > > But we know the transition latency of this system. Why should we > > claim it as "unknown"? The sfi_freq_table_entry has latency > > field - does it not make irrelevant then? > > I wrote the SFI spec. > If I did it again, I would not include the latency field in the FREQ table, > because Linux does not need it. > > >> ondemand will compare this to TRANSITION_LATENCY_LIMIT (10 * 1000 * 1000) > >> and since -1 is less than 10,000,000; it will be happy. > >> > >> > + for (i = 0; i < num_freq_table_entries; i++) { > >> > + /* detect transition latency */ > >> > + if ((sfi_cpufreq_array[i].latency * 1000) > > >> > + policy->cpuinfo.transition_latency) > >> > + policy->cpuinfo.transition_latency = > >> > + sfi_cpufreq_array[i].latency * 1000; > >> > >> delete above 5 lines. every SFI system will have latency > >> plenty lower than that required by ondemand governor. > > There is effectively no customer for the information being provided, > as there are only two possible outcomes: > > 1. The largest value in the table is < 10ms, and ondemand loads > 2. The largest value in the table is > 10ms and ondemand fails to load. > #1 is how it should always work on all known SFI platforms. > #2 is a firmware bug. > > Well, we can do #1 with 1 line, and at the same time eliminate > exposure to firmware bugs in #2. Ok, as we know the latency of this system (as 100 us), I will hardcode this with 1 line and remove the rest of detection stuff.. Srinidhi