From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wang, Wei W" Subject: Re: [PATCH v4 10/11] x86/intel_pstate: support the use of intel_pstate in pmstat.c Date: Wed, 9 Sep 2015 12:56:48 +0000 Message-ID: <286AC319A985734F985F78AFA26841F7A24B3B@shsmsx102.ccr.corp.intel.com> References: <1435231033-22806-1-git-send-email-wei.w.wang@intel.com> <55B264B802000078000953C0@prv-mh.provo.novell.com> <286AC319A985734F985F78AFA26841F7A23F12@shsmsx102.ccr.corp.intel.com> <55F00A7C02000078000A1231@prv-mh.provo.novell.com> <286AC319A985734F985F78AFA26841F7A2441E@shsmsx102.ccr.corp.intel.com> <55F0114B02000078000A126B@prv-mh.provo.novell.com> <286AC319A985734F985F78AFA26841F7A245E8@shsmsx102.ccr.corp.intel.com> <55F0216A02000078000A1331@prv-mh.provo.novell.com> <286AC319A985734F985F78AFA26841F7A247E6@shsmsx102.ccr.corp.intel.com> <55F03ABD02000078000A1410@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55F03ABD02000078000A1410@prv-mh.provo.novell.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: "andrew.cooper3@citrix.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 09/09/2015 19:57, Jan Beulich wrote: >>> On 09.09.15 at 12:35, wrote: > On 09/09/2015 18:10, Jan Beulich wrote: >>>> On 09.09.15 at 11:35, wrote: >>> Using the drinking vessel analogy, we are not putting milk and water >>>into the vessel at the same time. If the producer puts water into the >>>vessel, then the consumer simply consumes water; If the producer puts >>>milk into the vessel, then the consumer simply consumes milk. I think >>>we don't need to worry about what type of drinking is put inside the >>>vessel, because the vessel is just an intermediate place holding the >>>liquid between the producer and consumer - the consumer has the >>>privity of contract with the producer and it has the right logic to >>>deal > with what's inside the vessel. > >> This analogy breaks for a blind: How would he know whether there's >> water or > milk in there? He'd have to try it. >>Now what if we use >venom instead of milk in your analogy? > >>Bottom line - the consumer needs to know what kind of data it is to >>expect to > consume. > > There is a contract between the consumer and the producer. In our > case, the contract is "p_cpufreq->scaling_driver". Before the right > consumer consumes the value of " uint32_t scaling_max_perf ", it goes through the check: > + if (!strncmp(p_cpufreq->scaling_driver, > + "intel_pstate", CPUFREQ_NAME_LEN) ) > , where "intel_pstate" can be changed to other new driver names > (contract) in the future. > Which is precisely what I already said doesn't scale. Can you please explain more why it doesn't scale? >>From my point of view, any other future value representation can be passed from the producer to the related consumer through this method. Best, Wei