lkml.org 
[lkml]   [2009]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [patch 1/2] x86: Add pm_play_dead funcptr to power-efficiently offline CPUs


>-----Original Message-----
>From: Peter Zijlstra [mailto:a.p.zijlstra@chello.nl]
>Sent: Saturday, May 23, 2009 3:45 AM
>To: Pallipadi, Venkatesh
>Cc: mingo@elte.hu; tglx@linutronix.de; hpa@zytor.com;
>linux-kernel@vger.kernel.org; lenb@kernel.org; Li, Shaohua;
>svaidy@linux.vnet.ibm.com
>Subject: Re: [patch 1/2] x86: Add pm_play_dead funcptr to
>power-efficiently offline CPUs
>
>On Fri, 2009-05-22 at 16:19 -0700, venkatesh.pallipadi@intel.com 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
>initialized
>> 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 registered,
>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 crash/hangs.

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.

Thanks,
Venki



\
 
 \ /
  Last update: 2009-05-23 17:09    [W:0.063 / U:1.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site