cpufreq: userspace: Use fine-grained mutex in userspace governor
The userspace governor currently uses a big global mutex to avoid the
race condition on the governor_data field of cpufreq_policy structure.
This leads to a low concurrency if multiple userspace applications are
trying to set the speed of different policies at the same time.
Introduce a per-policy mutex to allow the updating of different policies
to be performed concurrently, improving overall concurrency.
Signed-off-by: Liao Chang <liaochang1@huawei.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>