Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1365035

Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency switching

From "Rafael J. Wysocki" <rafael@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency switching
Date 2016-03-27 03:30 +0200
Message-ID <rh7GG-XM-5@gated-at.bofh.it> (permalink)
References <rfjLX-5N2-3@gated-at.bofh.it> <rfjLX-5N2-7@gated-at.bofh.it> <rgL3r-1Mn-3@gated-at.bofh.it> <rgLwt-1ZH-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Mar 26, 2016 at 2:46 AM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> On Sat, Mar 26, 2016 at 2:12 AM, Steve Muckle <steve.muckle@linaro.org> wrote:
>> Hi Rafael,
>>
>> On 03/21/2016 06:53 PM, Rafael J. Wysocki wrote:
>>> Add two new policy flags, fast_switch_possible, to be set by the
>>> cpufreq driver if fast frequency switching can be used for the
>>> given policy and fast_switch_enabled, to be set by the governor
>>> if it is going to use fast frequency switching for the given
>>> policy.  Also add a helper for setting the latter.
>> ...
>>> @@ -740,6 +777,9 @@ static int acpi_cpufreq_cpu_init(struct
>>>               goto err_unreg;
>>>       }
>>>
>>> +     policy->fast_switch_possible = !acpi_pstate_strict &&
>>> +             !(policy_is_shared(policy) && policy->shared_type != CPUFREQ_SHARED_TYPE_ANY);
>>
>> Could the policy->fast_switch_possible flag be avoided by just checking
>> whether a driver has registered the .fast_switch callback?
>
> No, it couldn't.
>
> As in this case, the driver has the ->fast_switch callback, but it
> can't be used for policies that don't satisfy the above condition.  At
> the same time it may be possible to use it for other policies on the
> same system in principle.

In fact, for fast switching to be useful, the driver has to guarantee
that frequency can be updated on any of the policy CPUs (and it
doesn't matter which of them updates the frequency) and that's what
the fast_switch_possible flag is really for.  I guess I should add a
comment to that effect to its definition.

Thanks,
Rafael

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 6/7][Resend] cpufreq: Support for fast frequency switching "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-22 03:00 +0100
  Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency  switching Steve Muckle <steve.muckle@linaro.org> - 2016-03-26 02:20 +0100
    Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency switching "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-26 02:50 +0100
      Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency switching "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-27 03:30 +0200
      Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency  switching Steve Muckle <steve.muckle@linaro.org> - 2016-03-28 18:50 +0200
        Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency switching "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-29 14:10 +0200
  Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency  switching Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-28 08:30 +0200
    Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency switching "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-29 14:30 +0200
  Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency  switching Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-28 09:10 +0200
    Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency switching "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-29 14:10 +0200
      Re: [PATCH v6 6/7][Resend] cpufreq: Support for fast frequency  switching Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-29 16:30 +0200
  [Update][PATCH v7 6/7] cpufreq: Support for fast frequency switching "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-30 03:50 +0200
    Re: [Update][PATCH v7 6/7] cpufreq: Support for fast frequency  switching Viresh Kumar <viresh.kumar@linaro.org> - 2016-03-30 07:10 +0200
      Re: [Update][PATCH v7 6/7] cpufreq: Support for fast frequency switching "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-30 13:30 +0200

csiph-web