Re: [v8 PATCH 1/8]: cpuidle: cleanup drivers/cpuidle/cpuidle.c
From: Arun R Bharadwaj <hidden>
Date: 2009-10-14 06:24:56
Also in:
linux-acpi, linux-arch, lkml
* Balbir Singh [off-list ref] [2009-10-12 17:06:02]:
* Arun R B [off-list ref] [2009-10-08 15:19:42]:quoted
* Arun R Bharadwaj [off-list ref] [2009-10-08 15:18:28]: This patch cleans up drivers/cpuidle/cpuidle.c Earlier cpuidle assumed pm_idle as the default idle loop. Break that assumption and make it more generic. cpuidle_idle_call() which is the main idle loop of cpuidle is to be called by architectures which have registered to cpuidle. Remove routines cpuidle_install/uninstall_idle_handler() which are not needed anymore.[snip] /**quoted
- * cpuidle_install_idle_handler - installs the cpuidle idle loop handler - */ -void cpuidle_install_idle_handler(void) -{ - if (enabled_devices && (pm_idle != cpuidle_idle_call)) { - /* Make sure all changes finished before we switch to new idle */ - smp_wmb(); - pm_idle = cpuidle_idle_call; - } -} - -/** - * cpuidle_uninstall_idle_handler - uninstalls the cpuidle idle loop handler - */ -void cpuidle_uninstall_idle_handler(void) -{ - if (enabled_devices && pm_idle_old && (pm_idle != pm_idle_old)) { - pm_idle = pm_idle_old; - cpuidle_kick_cpus(); - } -} -I see the routines above being called in from cpuidle_pause/resume_and_lock/unlock below and they are entries from ACPI on ACPI_PROCESSOR_NOTIFY_POWER and from the hotplug path, could you test them to make sure they are not broken. We also seem to be missing a cpuidle_kick_cpus() in cpuidle_pause_and_lock() [snip]
Hi Balbir, yes, we definitely need a cpuidle_kick_cpus() in cpuidle_pause_and_lock() since this is used while disabling the cpuidle_device and the cpus need to be kicked out of the idle states. I will test this modified code and see if it breaks hotplug. thanks, arun
-- Balbir