Hi Viresh,
On Fri, Nov 28, 2014 at 09:44:10AM +0000, Viresh Kumar wrote:
Locking around idr_alloc/idr_remove looks rather pointless as there is no race it is trying to fix. Remove it.
You are assuming that all cpufreq cooling devices are registered sequentially, one after the other. That doesn't need be the case. I don't think the performance that you get from this patch justifies the possible races that could be introduced by not having the locking. Why should we remove this?
get_idr() and release_idr() aren't much useful now, so get rid of them as well.
Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
@Eduardo: Same is true for thermal-core as well ?
I think that my previous concern applies to thermal_core as well, thermal zones may not be initialised sequentially.
Cheers, Javi