x86, suspend: Avoid unnecessary smp alternatives switch during suspend/resume
During suspend, we disable all the non boot cpus. And during resume we bring them all back again. So no need to do alternatives_smp_switch() in between. On my core 2 based laptop, this speeds up the suspend path by 15msec and the resume path by 5 msec (suspend/resume speed up differences can be attributed to the different P-states that the cpu is in during suspend/resume). Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> LKML-Reference: <1290557500.4946.8.camel@sbsiddha-MOBL3.sc.intel.com> Cc: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
committed by
H. Peter Anvin
parent
cf7d7e5a19
commit
3fb82d56ad
@@ -1166,6 +1166,20 @@ out:
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
void arch_disable_nonboot_cpus_begin(void)
|
||||
{
|
||||
/*
|
||||
* Avoid the smp alternatives switch during the disable_nonboot_cpus().
|
||||
* In the suspend path, we will be back in the SMP mode shortly anyways.
|
||||
*/
|
||||
skip_smp_alternatives = true;
|
||||
}
|
||||
|
||||
void arch_disable_nonboot_cpus_end(void)
|
||||
{
|
||||
skip_smp_alternatives = false;
|
||||
}
|
||||
|
||||
void arch_enable_nonboot_cpus_begin(void)
|
||||
{
|
||||
set_mtrr_aps_delayed_init();
|
||||
|
Reference in New Issue
Block a user