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


Groups > linux.kernel > #1329627

Re: [PATCH V3 12/13] cpufreq: ondemand: Traverse list of policy_dbs in update_sampling_rate()

From "Rafael J. Wysocki" <rafael@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH V3 12/13] cpufreq: ondemand: Traverse list of policy_dbs in update_sampling_rate()
Date 2016-02-08 23:10 +0100
Message-ID <r02an-2VY-33@gated-at.bofh.it> (permalink)
References <qZSul-4Ei-3@gated-at.bofh.it> <qZSum-4Ei-9@gated-at.bofh.it> <qZUcO-5U1-11@gated-at.bofh.it> <qZXNo-8m9-31@gated-at.bofh.it> <r02am-2VY-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Feb 8, 2016 at 11:05 PM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> On Mon, Feb 8, 2016 at 6:20 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> On 08-02-16, 14:32, Rafael J. Wysocki wrote:
>>> The comment still applies.
>>>
>>> Moreover, please extend it to say that this must be called with
>>> dbs_data->mutex held (or it looks racy otherwise).
>>
>> Modified it as:
>>
>> + *
>> + * Simply updating dbs_tuners_int.sampling_rate might not be appropriate here.
>> + * For example, if the original sampling_rate was 1 second and the requested new
>> + * sampling rate is 10 ms because the user needs immediate reaction from
>> + * ondemand governor, otherwise the governor may change the sampling rate too
>> + * late; up to 1 second later.
>
> The "otherwise" doesn't seem to be necessary here.
>
>> + *
>> + * Similar logic applies while increasing the sampling rate. And so we need to
>> + * update it with immediate effect.
>
> Actually, no, it doesn't apply.  If you increase the sampling rate,
> the governor will never be late.  It may be early, but that's fine in
> this case.
>
> It just doesn't hurt to update immediately in this case too.
>
>> + *
>> + * This must be called with dbs_data->mutex held, otherwise traversing
>> + * policy_dbs_list isn't safe.

I really don't know what's wrong with retaining the original paragraph
and adding the above sentence after it.

Thanks,
Rafael

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


Thread

[PATCH V3 12/13] cpufreq: ondemand: Traverse list of policy_dbs in update_sampling_rate() Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-08 12:50 +0100
  Re: [PATCH V3 12/13] cpufreq: ondemand: Traverse list of policy_dbs  in update_sampling_rate() Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-08 14:40 +0100
    Re: [PATCH V3 12/13] cpufreq: ondemand: Traverse list of policy_dbs  in update_sampling_rate() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-08 14:40 +0100
  Re: [PATCH V3 12/13] cpufreq: ondemand: Traverse list of policy_dbs  in update_sampling_rate() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-08 14:40 +0100
    Re: [PATCH V3 12/13] cpufreq: ondemand: Traverse list of policy_dbs  in update_sampling_rate() Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-08 18:30 +0100
      Re: [PATCH V3 12/13] cpufreq: ondemand: Traverse list of policy_dbs  in update_sampling_rate() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-08 23:10 +0100
        Re: [PATCH V3 12/13] cpufreq: ondemand: Traverse list of policy_dbs  in update_sampling_rate() "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-08 23:10 +0100

csiph-web