From: "Jan Beulich" Subject: Re: [PATCH v2 6/9] x86/intel_pstate: the main boby of the intel_pstate driver Date: Wed, 10 Jun 2015 07:53:49 +0100 Message-ID: <5577FB1D0200007800082E37@mail.emea.novell.com> References: <1463125852-14155-1-git-send-email-wei.w.wang@intel.com> <55649803020000780007DF1A@mail.emea.novell.com> <286AC319A985734F985F78AFA26841F798A1C9@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: <286AC319A985734F985F78AFA26841F798A1C9@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: "jinsong.liu@alibaba-inc.com" , "xen-devel@lists.xen.org" , "wei.liu2@citrix.com" , "ian.campbell@citrix.com" , "andrew.cooper3@citrix.com" List-Id: xen-devel@lists.xenproject.org >>> On 10.06.15 at 07:20, wrote: > On 26/05/2015 21:58, Jan Beulich wrote >> >>> On 13.05.16 at 09:50, wrote: >> > + if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) { >> > + limits.no_turbo = 0; >> > + limits.max_perf_pct = 100; >> > + limits.max_perf = int_tofp(1); >> > + limits.min_perf_pct = 100; >> > + limits.min_perf = int_tofp(1); >> > + policy->max_perf_pct = 100; >> > + policy->min_perf_pct = 100; >> > + return 0; > > I noticed another issue. The intel_pstate driver originally manages all the > CPUs using the global "limit" structure (e.g. if one CPU is set to be in the > Performance mode, min_perf=max_perf , then all the CPUs will run in the > Performance mode). This will generate confusing status info to users in our > case. For example, if we set CPU0 in Powersave, then set CPU1 in Performance. > We will see CPU0 in the Powersave mode, but it's actually running in the > Performance mode. > > How do you think if we move the global "limit" structure to the per-cpu > policy structure, so that each CPU can be configured individually? Sounds reasonable; I don't recall having asked for that structure to be global... Jan