All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Wei Wang <wei.w.wang@intel.com>
Cc: andrew.cooper3@citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH v3 03/11] x86/intel_pstate: add new policy fields and a new driver interface
Date: Thu, 18 Jun 2015 15:15:51 +0100	[thread overview]
Message-ID: <5582EEB70200007800086ACC@mail.emea.novell.com> (raw)
In-Reply-To: <1434011209-16925-1-git-send-email-wei.w.wang@intel.com>

>>> On 11.06.15 at 10:26, <wei.w.wang@intel.com> wrote:
> --- a/xen/drivers/cpufreq/utility.c
> +++ b/xen/drivers/cpufreq/utility.c
> @@ -457,6 +457,12 @@ int __cpufreq_set_policy(struct cpufreq_policy *data,
>      data->min = policy->min;
>      data->max = policy->max;
>  
> +    if (cpufreq_driver->setpolicy) {
> +        data->limits.min_perf_pct = policy->limits.min_perf_pct;
> +        data->limits.max_perf_pct = policy->limits.max_perf_pct;

For one you leave all other data->limits fields uninitialized - please
use "data->limits = policy->limits". And then I don't see why this
should be done inside the if() - there's no obvious connection
between ->setpolicy being non-NULL and ->limits having meaning
to the driver - this is solely your intended _use_ model.

> --- a/xen/include/acpi/cpufreq/cpufreq.h
> +++ b/xen/include/acpi/cpufreq/cpufreq.h
> @@ -41,6 +41,18 @@ struct cpufreq_cpuinfo {
>      unsigned int        transition_latency; /* in 10^(-9) s = nanoseconds */
>  };
>  
> +struct perf_limits {
> +    int no_turbo;
> +    int turbo_disabled;

Both bool_t I suppose.

> @@ -52,6 +64,8 @@ struct cpufreq_policy {
>      unsigned int        max;    /* in kHz */
>      unsigned int        cur;    /* in kHz, only needed if cpufreq
>                                   * governors are used */
> +    unsigned int        policy;

This field isn't being used anywhere here. Please add it upon first use.

Jan

      reply	other threads:[~2015-06-18 14:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11  8:26 [PATCH v3 03/11] x86/intel_pstate: add new policy fields and a new driver interface Wei Wang
2015-06-18 14:15 ` Jan Beulich [this message]

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=5582EEB70200007800086ACC@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wei.w.wang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.