lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hcV9gNfgwX+5RZWc6NbqEfnhwaFJSRDJJ=sApJM2_pKQ@mail.gmail.com>
Date:   Thu, 20 Oct 2016 23:19:46 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Linux PM list <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cpufreq: intel_pstate: Set P-state upfront in performance mode

On Thu, Oct 20, 2016 at 8:22 PM, Srinivas Pandruvada
<srinivas.pandruvada@...ux.intel.com> wrote:
> On Wed, 2016-10-19 at 02:57 +0200, Rafael J. Wysocki wrote:
>> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>>
>
> [...]
>
>> +     if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {
>> +             /*
>> +              * NOHZ_FULL CPUs need this as the governor callback
>> may not
>> +              * be invoked on them.
>> +              */
>> +             intel_pstate_clear_update_util_hook(policy->cpu);
>> +             intel_pstate_max_within_limits(cpu);
>> +     }
>> +
>
> Can we move this to intel_pstate_set_performance_limits
>
> diff --git a/drivers/cpufreq/intel_pstate.c
> b/drivers/cpufreq/intel_pstate.c
> index a6ffd79..d0fd73e 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -1543,6 +1543,13 @@ static void
> intel_pstate_set_performance_limits(struct perf_limits *limits)
>         limits->max_sysfs_pct = 100;
>         limits->min_policy_pct = 0;
>         limits->min_sysfs_pct = 0;
> +
> +       /*
> +        * NOHZ_FULL CPUs need this as the governor callback may not
> +        * be invoked on them.
> +        */
> +       intel_pstate_clear_update_util_hook(policy->cpu);
> +       intel_pstate_max_within_limits(cpu);
>  }
>
>  static int intel_pstate_set_policy(struct cpufreq_policy *policy)
> @@ -1599,15 +1606,6 @@ static int intel_pstate_set_policy(struct
> cpufreq_policy *policy)
>         limits->max_perf = round_up(limits->max_perf, FRAC_BITS);
>
>   out:
> -       if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {
> -               /*
> -                * NOHZ_FULL CPUs need this as the governor callback
> may not
> -                * be invoked on them.
> -                */
> -               intel_pstate_clear_update_util_hook(policy->cpu);
> -               intel_pstate_max_within_limits(cpu);
> -       }
> -
>         intel_pstate_set_update_util_hook(policy->cpu);
>
>         intel_pstate_hwp_set_policy(policy);

Not really, because the policy->max < policy->cpuinfo.max_freq case
needs to be covered too.

At least I don't see why it shouldn't be covered.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ