]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
intel_pstate: Avoid unnecessary synchronize_sched() during initialization
authorChen Yu <yu.c.chen@intel.com>
Wed, 11 May 2016 06:33:08 +0000 (14:33 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 11 May 2016 20:56:34 +0000 (22:56 +0200)
commit4578ee7e1defe534582fe3afdb747b86023207f0
tree2857ab0921181c08f60d3030ba8e04656f063e53
parentc29af6f1a4e6f54e806fed1c40e7d338650b7791
intel_pstate: Avoid unnecessary synchronize_sched() during initialization

Currently, in intel_pstate_clear_update_util_hook(), after
clearing the utilization update hook, we leverage
synchronize_sched() to deal with synchronization, which
is a little bit time-costly because synchronize_sched()
has to wait for all the CPUs to go through a grace period.

Actually, the synchronize_sched() is not necessary if the utilization
update hook has not been set for the given CPU yet, so make the driver
check if that's the case and avoid the synchronize_sched() call then.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=116371
Tested-by: Tian Ye <yex.tian@intel.com>
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
[ rjw : Rebase ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c