lkml.org 
[lkml]   [2009]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/2] x86: put offline CPUs into deepest mwait cstate_subcstate
On Sat, May 23, 2009 at 07:19:42AM +0800, Pallipadi, Venkatesh wrote:
> Offline CPUs can save power by going into deepest cstate, subcstate
> instead of hlt loop.
>
> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> ---
> arch/x86/kernel/acpi/cstate.c | 51 +++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 51 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
> index bbbe4bb..5b0988a 100644
> --- a/arch/x86/kernel/acpi/cstate.c
> +++ b/arch/x86/kernel/acpi/cstate.c
> @@ -150,6 +150,54 @@ void acpi_processor_ffh_cstate_enter(struct acpi_processor_cx *cx)
> }
> EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_enter);
>
> +static unsigned long mwait_play_dead_eax;
> +
> +static void mwait_play_dead(void)
> +{
> + if (boot_cpu_data.x86 >= 4)
> + wbinvd();
> +
> + while (1) {
> + __monitor((void *)&current_thread_info()->flags, 0, 0);
> + smp_mb();
> + __mwait(mwait_play_dead_eax, 0);
> + }
> +}
CPU is dead, can current_thread_info() still be used? Maybe just monitor a never changed
address.

Looks the patch will always take the highest native C-state, is this safe, considering
BIOS usually limit C-state?

Thanks,
Shaohua


\
 
 \ /
  Last update: 2009-05-25 02:59    [W:0.081 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site