RE: [patch 1/2] x86: Add pm_play_dead funcptr to power-efficientlyoffline CPUs

From: Pallipadi, Venkatesh
Date: Mon Jun 22 2009 - 13:23:32 EST

>From: Pallipadi, Venkatesh
>>From: Peter Zijlstra [mailto:a.p.zijlstra@xxxxxxxxx]
>>On Fri, 2009-05-22 at 16:19 -0700,
>venkatesh.pallipadi@xxxxxxxxx wrote:
>>> plain text document attachment
>>> (0001-x86-Add-pm_play_dead-funcptr-to-power-efficiently-o.patch)
>>> Add a funcptr pm_play_dead (similar to pm_idle) that can take
>>> the offline CPUs to the most power efficient idle state.
>>> This patch just adds the func pointer. The pointer will get
>>> by patch that follows.
>>Since the pm_idle function pointer has given us so much grief, I don't
>>think its wise to repeat that particular disaster.
>>I'd much rather see a framework where idle functions can be
>>and selected from based on criteria such as wakeup latency as provided
>>by the pm_qos stuff, and power saving.
>>This framework should be shared between hotplug-idle and the regular
>>idle routines. Hotplug would of course not care about things
>>like wakeup
>>latency and might therefore pick another idle routine.
>Yes. Thought about that approach. There are issues with that
>approach however.
>- It would be ugly as we have to add logic in various low
>level idle handlers we have today mwait_idle, default_idle,
>acpi_mwait_idle, acpi_ioport_idle to make them aware of
>offline idle case and disable interrupt and not enable
>interrupt while going idle and not to wake up on interrupt.
>- There are limitations on what we can and cannot do when
>offline. We have had issues with calling acpi methods and/or
>IO port accesses, during suspend before, so CPU going on
>suspend only uses C1. Specifically, with the above approach we
>will have:
>1) CPU 1 going offline and starts using regular ACPI IO port C-states.
>2) CPU 0 starts suspend and after some points it is unsafe to
>access ACPI io port accesses, which can potentially result in
>So, I would like to keep ACPI out of play_dead. And keeping
>idle and play_dead separate seemed to be cleaner way to do it.


Any more comments on this approach? As I mentioned above, from my POV,
it is simpler and cleaner to keep ACPI out of the CPU offline path.
Do you agree?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at