From: "Jan Beulich" Subject: Re: [PATCH v3 10/11] x86/intel_pstate: support the use of intel_pstate in pmstat.c Date: Tue, 16 Jun 2015 08:53:56 +0100 Message-ID: <557FF2340200007800085444@mail.emea.novell.com> References: <1434011460-18222-1-git-send-email-wei.w.wang@intel.com> <557996ED.9060806@citrix.com> <286AC319A985734F985F78AFA26841F798D1CD@shsmsx102.ccr.corp.intel.com> <557ABEE9.5050801@citrix.com> <286AC319A985734F985F78AFA26841F798E46A@shsmsx102.ccr.corp.intel.com> <557EB3CA0200007800084B25@mail.emea.novell.com> <286AC319A985734F985F78AFA26841F798FE52@shsmsx102.ccr.corp.intel.com> <557EE2DC0200007800084D31@mail.emea.novell.com> <286AC319A985734F985F78AFA26841F7991C3E@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: <286AC319A985734F985F78AFA26841F7991C3E@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: Julien Grall , "andrew.cooper3@citrix.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 16.06.15 at 09:09, wrote: > On 15/06/2015 20:37, Jan Beulich wrote: >> >>> On 15.06.15 at 14:28, wrote: >> > On 15/06/2015 17:15, Jan Beulich wrote: >> >> >>> On 15.06.15 at 02:30, wrote: >> >> > We actually want it be intel_pstate specific. If maintainers agree, >> >> > I think renaming it to intel_pstate_policy is a good option. >> >> >> >> No, this name is just ugly. If you need driver specific data, have a >> >> void >> > pointer >> >> in the generic structure; the driver can then allocate memory to be >> >> pointed to by that, and can store there whatever private data it needs. >> > >> > OK. I plan to make the following changes: >> > >> > 1) in cpufreq_policy, add a field - void *private_data; >> > >> > >> > 2) add a new structure: >> > struct intel_pstate_policy { >> > unsigned int policy; >> > } >> >> struct intel_pstate_private or struct intel_pstate_data please. >> > > "struct perf_limits" is currently used only by intel_pstate, should we also > move it to the intel_pstate_private struct, instead of the cpufreq_policy? Yes of course - anything private to the driver should go there. Jan