From: "Jan Beulich" Subject: Re: [PATCH v3 10/11] x86/intel_pstate: support the use of intel_pstate in pmstat.c Date: Tue, 23 Jun 2015 09:48:22 +0100 Message-ID: <558939770200007800087FD0@mail.emea.novell.com> References: <1434011460-18222-1-git-send-email-wei.w.wang@intel.com> <286AC319A985734F985F78AFA26841F7996B2B@shsmsx102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <286AC319A985734F985F78AFA26841F7996B2B@shsmsx102.ccr.corp.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei W Wang Cc: "andrew.cooper3@citrix.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 23.06.15 at 03:40, wrote: > Hi Jan, > On 11/06/2015 16:31, Wei Wang wrote: >> Add support in the pmstat.c so that the xenpm tool can request to access the >> intel_pstate driver. > > I want to propose some other changes here to commonize the intel_pstate > implementation in this common code (pmstat.c). > > 1) introduce a new struct: > struct internal_governor { > char *avail_gov; > uint32_t cur_gov; > uint32_t gov_num; > } > > 2) a new callback in cpufreq_driver, > "cpufreq_driver->get_internal_gov(internal_gov)", > This allows other possible cpufreq drivers, which implement their own > internal governors, to return their own interenal governor info (e.g. we will > not need to use the INTEL_PSTATE_GOV_NUM, which is defined to be 4, in this > patch). > > Do you think this would be better? I really need to see this in context. Jan