From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: venkatesh.pallipadi@intel.com
Cc: mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com,
linux-kernel@vger.kernel.org, lenb@kernel.org,
shaohua.li@intel.com, svaidy@linux.vnet.ibm.com
Subject: Re: [patch 1/2] x86: Add pm_play_dead funcptr to power-efficiently offline CPUs
Date: Sat, 23 May 2009 12:44:58 +0200 [thread overview]
Message-ID: <1243075498.6582.1049.camel@laptop> (raw)
In-Reply-To: <20090522232230.020301000@intel.com>
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.
> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> ---
> arch/x86/include/asm/smp.h | 2 ++
> arch/x86/kernel/smpboot.c | 7 ++++++-
> 2 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
> index 19e0d88..0388b81 100644
> --- a/arch/x86/include/asm/smp.h
> +++ b/arch/x86/include/asm/smp.h
> @@ -148,6 +148,8 @@ static inline int num_booting_cpus(void)
> {
> return cpumask_weight(cpu_callout_mask);
> }
> +
> +extern void (*pm_play_dead)(void);
> #endif /* CONFIG_SMP */
>
> extern unsigned disabled_cpus __cpuinitdata;
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 58d24ef..4f8af6a 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -1195,6 +1195,8 @@ __init void prefill_possible_map(void)
> nr_cpu_ids = possible;
> }
>
> +void (*pm_play_dead)(void) = NULL;
> +
> #ifdef CONFIG_HOTPLUG_CPU
>
> static void remove_siblinginfo(int cpu)
> @@ -1313,7 +1315,10 @@ void play_dead_common(void)
> void native_play_dead(void)
> {
> play_dead_common();
> - wbinvd_halt();
> + if (pm_play_dead)
> + pm_play_dead();
> + else
> + wbinvd_halt();
> }
>
> #else /* ... !CONFIG_HOTPLUG_CPU */
> --
> 1.6.0.6
>
next prev parent reply other threads:[~2009-05-23 10:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 23:19 [patch 0/2] x86: Make offline cpus to go to deepest idle state using mwait venkatesh.pallipadi
2009-05-22 23:19 ` [patch 1/2] x86: Add pm_play_dead funcptr to power-efficiently offline CPUs venkatesh.pallipadi
2009-05-23 10:44 ` Peter Zijlstra [this message]
2009-05-23 15:07 ` Pallipadi, Venkatesh
2009-06-22 17:25 ` Pallipadi, Venkatesh
2009-05-22 23:19 ` [patch 2/2] x86: put offline CPUs into deepest mwait cstate_subcstate venkatesh.pallipadi
2009-05-25 0:56 ` Shaohua Li
2009-05-26 21:17 ` Pallipadi, Venkatesh
2010-09-17 23:46 ` [tip:x86/idle] x86, hotplug: Use mwait to offline a processor, fix the legacy case tip-bot for H. Peter Anvin
2010-09-18 0:13 ` [tip:x86/idle] x86, hotplug: Move WBINVD back outside the play_dead loop tip-bot for H. Peter Anvin
2010-09-18 0:48 ` Venkatesh Pallipadi
2010-09-20 18:20 ` H. Peter Anvin
2010-09-20 20:11 ` H. Peter Anvin
2010-09-20 22:34 ` Venkatesh Pallipadi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1243075498.6582.1049.camel@laptop \
--to=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=shaohua.li@intel.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.