On 26-06-15, 12:20, Preeti U Murthy wrote:
On 06/22/2015 01:32 PM, Viresh Kumar wrote:
The sampling rate is updated with a call to update_sampling_rate(), and we process CPUs one by one here. While the work is canceled on per-cpu basis, it is getting enqueued (by mistake) for all policy->cpus.
That would result in wasting cpu cycles for queuing works which are already queued and never canceled.
This patch is about queuing work only on the cpu for which it was canceled earlier.
gov_queue_work() was missing the CPU parameter and it's better to club 'modify_all' and the new 'cpu' parameter to a 'cpus' mask. And so this patch also changes the prototype of gov_queue_work() and fixes its caller sites.
This looks good, except I did not understand the motivation to change the 'modify_all' to 'load_eval'. Neither is saying the purpose better than the other.
modify_all was used to check if we need to queue work on all CPUs or a single cpu. But now we pass the cpumask and that name isn't valid anymore. The only other thing we do with help of modify_all is evaluating the load again and so is named load_eval.
I think the purpose is very much clear with load_eval now.