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


Groups > linux.kernel > #1257641

Re: [PATCH V3 1/5] cpufreq: ondemand: Drop unnecessary locks from update_sampling_rate()

From "Rafael J. Wysocki" <rjw@rjwysocki.net>
Newsgroups linux.kernel
Subject Re: [PATCH V3 1/5] cpufreq: ondemand: Drop unnecessary locks from update_sampling_rate()
Date 2015-10-28 04:40 +0100
Message-ID <qopKG-5Hv-7@gated-at.bofh.it> (permalink)
References <qj2OK-A2-11@gated-at.bofh.it> <qj2OL-A2-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tuesday, October 13, 2015 01:39:01 PM Viresh Kumar wrote:
> 'timer_mutex' is required to sync work-handlers of policy->cpus.
> update_sampling_rate() is just canceling the works and queuing them
> again. This isn't protecting anything at all in update_sampling_rate()
> and is not gonna be of any use.
> 
> Even if a work-handler is already running for a CPU,
> cancel_delayed_work_sync() will wait for it to finish.
> 
> Drop these unnecessary locks.
> 
> Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

I'm queuing this up for 4.4, although I think that the changelog is not right.

While at it, what are the race conditions the lock is protecting against?

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

Re: [PATCH V3 1/5] cpufreq: ondemand: Drop unnecessary locks from update_sampling_rate() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-28 04:40 +0100
  Re: [PATCH V3 1/5] cpufreq: ondemand: Drop unnecessary locks from  update_sampling_rate() Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-28 05:50 +0100
    Re: [PATCH V3 1/5] cpufreq: ondemand: Drop unnecessary locks from update_sampling_rate() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-28 06:30 +0100
      Re: [PATCH V3 1/5] cpufreq: ondemand: Drop unnecessary locks from  update_sampling_rate() Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-28 07:50 +0100
        Re: [PATCH V3 1/5] cpufreq: ondemand: Drop unnecessary locks from update_sampling_rate() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-28 08:20 +0100
          Re: [PATCH V3 1/5] cpufreq: ondemand: Drop unnecessary locks from  update_sampling_rate() Viresh Kumar <viresh.kumar@linaro.org> - 2015-10-28 10:00 +0100

csiph-web