From: "Wang, Wei W" <wei.w.wang@intel.com>
To: Julien Grall <julien.grall@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
"jbeulich@suse.com" <jbeulich@suse.com>
Cc: "andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>
Subject: Re: [PATCH v3 07/11] x86/intel_pstate: changes in cpufreq_del_cpu for CPU offline
Date: Fri, 12 Jun 2015 02:01:01 +0000 [thread overview]
Message-ID: <286AC319A985734F985F78AFA26841F798D0F0@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <55799582.5060905@citrix.com>
On 11/06/2015 22:06, Julien Grall wrote:
> On 11/06/2015 04:28, Wei Wang wrote:
> > cpufreq_cpu_policy is used in intel_pstate_set_pstate(), so we change
> > to NULL it after the call of cpufreq_driver->exit. Otherwise, a
> > calltrace will show up on your screen due to the reference of a NULL
> > pointer when you power down the system.
> >
> > Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> > ---
> > xen/drivers/cpufreq/cpufreq.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/xen/drivers/cpufreq/cpufreq.c
> > b/xen/drivers/cpufreq/cpufreq.c index 6003a8c..a8772e8 100644
> > --- a/xen/drivers/cpufreq/cpufreq.c
> > +++ b/xen/drivers/cpufreq/cpufreq.c
> > @@ -335,12 +335,11 @@ int cpufreq_del_cpu(unsigned int cpu)
> >
> > /* for HW_ALL, stop gov for each core of the _PSD domain */
> > /* for SW_ALL & SW_ANY, stop gov for the 1st core of the _PSD domain
> */
> > - if (hw_all || (cpumask_weight(cpufreq_dom->map) ==
> > - perf->domain_info.num_processors))
> > + if (!policy->policy && (hw_all || (cpumask_weight(cpufreq_dom->map)
> ==
> > + perf->domain_info.num_processors)))
>
> Based on your patch #6, the field policy contains value which is defined per-
> cpufreq driver (because you defined internal value). How can you be sure
> that a driver will never use 0 as a valid value?
Hi Julien, what do you mean by "per-cpufreq driver"?
We currently have two P-state drivers. This filed is currently only used by the intel_pstate driver, and the four usable values are:
#define CPUFREQ_POLICY_POWERSAVE (1)
#define CPUFREQ_POLICY_PERFORMANCE (2)
#define CPUFREQ_POLICY_USERSPACE (3)
#define CPUFREQ_POLICY_ONDEMAND (4)
The intel_pstate won't use 0 as a valid value, and the default value is CPUFREQ_POLICY_ONDEMAND. If it's 0, it basically means the old acpi-cpufreq driver is being used.
Best,
Wei
next prev parent reply other threads:[~2015-06-12 2:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 8:28 [PATCH v3 07/11] x86/intel_pstate: changes in cpufreq_del_cpu for CPU offline Wei Wang
2015-06-11 14:04 ` Julien Grall
2015-06-12 2:01 ` Wang, Wei W [this message]
2015-06-12 11:39 ` Julien Grall
2015-06-15 0:31 ` Wang, Wei W
2015-06-15 9:13 ` Jan Beulich
2015-06-19 9:43 ` Jan Beulich
2015-06-23 6:16 ` Wang, Wei W
2015-06-23 8:08 ` Jan Beulich
2015-06-23 8:21 ` Wang, Wei W
2015-06-23 8:47 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=286AC319A985734F985F78AFA26841F798D0F0@shsmsx102.ccr.corp.intel.com \
--to=wei.w.wang@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).