From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Trinabh Gupta <trinabh@linux.vnet.ibm.com>
Cc: linuxppc-dev@ozlabs.org, linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH V1 4/7] cpuidle: (powerpc) Add cpu_idle_wait() to allow switching idle routines
Date: Fri, 17 Jun 2011 14:32:08 +1000 [thread overview]
Message-ID: <1308285128.32158.8.camel@pasglop> (raw)
In-Reply-To: <20110607162959.6848.26918.stgit@tringupt.in.ibm.com>
On Tue, 2011-06-07 at 22:00 +0530, Trinabh Gupta wrote:
> diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
> index 39a2baa..932392b 100644
> --- a/arch/powerpc/kernel/idle.c
> +++ b/arch/powerpc/kernel/idle.c
> @@ -102,6 +102,24 @@ void cpu_idle(void)
> }
> }
>
> +static void do_nothing(void *unused)
> +{
> +}
> +
> +/*
> + * cpu_idle_wait - Used to ensure that all the CPUs come out of the old
> + * idle loop and start using the new idle loop.
> + * Required while changing idle handler on SMP systems.
> + * Caller must have changed idle handler to the new value before the call.
> + */
> +void cpu_idle_wait(void)
> +{
> + smp_mb();
> + /* kick all the CPUs so that they exit out of old idle routine */
> + smp_call_function(do_nothing, NULL, 1);
> +}
> +EXPORT_SYMBOL_GPL(cpu_idle_wait);
> +
> int powersave_nap;
>
> #ifdef CONFIG_SYSCTL
This is gross :-)
Do you need to absolutely ensure the idle task has changed or just
kicking it with a send reschedule is enough ?
Cheers,
Ben.
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Trinabh Gupta <trinabh@linux.vnet.ibm.com>
Cc: linux-pm@lists.linux-foundation.org, linuxppc-dev@ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH V1 4/7] cpuidle: (powerpc) Add cpu_idle_wait() to allow switching idle routines
Date: Fri, 17 Jun 2011 14:32:08 +1000 [thread overview]
Message-ID: <1308285128.32158.8.camel@pasglop> (raw)
In-Reply-To: <20110607162959.6848.26918.stgit@tringupt.in.ibm.com>
On Tue, 2011-06-07 at 22:00 +0530, Trinabh Gupta wrote:
> diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
> index 39a2baa..932392b 100644
> --- a/arch/powerpc/kernel/idle.c
> +++ b/arch/powerpc/kernel/idle.c
> @@ -102,6 +102,24 @@ void cpu_idle(void)
> }
> }
>
> +static void do_nothing(void *unused)
> +{
> +}
> +
> +/*
> + * cpu_idle_wait - Used to ensure that all the CPUs come out of the old
> + * idle loop and start using the new idle loop.
> + * Required while changing idle handler on SMP systems.
> + * Caller must have changed idle handler to the new value before the call.
> + */
> +void cpu_idle_wait(void)
> +{
> + smp_mb();
> + /* kick all the CPUs so that they exit out of old idle routine */
> + smp_call_function(do_nothing, NULL, 1);
> +}
> +EXPORT_SYMBOL_GPL(cpu_idle_wait);
> +
> int powersave_nap;
>
> #ifdef CONFIG_SYSCTL
This is gross :-)
Do you need to absolutely ensure the idle task has changed or just
kicking it with a send reschedule is enough ?
Cheers,
Ben.
next prev parent reply other threads:[~2011-06-17 4:32 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 16:29 [RFC PATCH V1 0/7] cpuidle: (POWER) cpuidle driver for pSeries Trinabh Gupta
2011-06-07 16:29 ` [RFC PATCH V1 1/7] cpuidle: create bootparam "cpuidle.off=1" Trinabh Gupta
2011-06-07 16:29 ` Trinabh Gupta
2011-06-17 4:29 ` Benjamin Herrenschmidt
2011-06-17 4:29 ` Benjamin Herrenschmidt
2011-06-21 4:36 ` Trinabh Gupta
2011-06-21 4:36 ` Trinabh Gupta
2011-06-21 4:36 ` Trinabh Gupta
2011-06-17 4:29 ` Benjamin Herrenschmidt
2011-06-07 16:29 ` [RFC PATCH V1 2/7] cpuidle: replace xen access to x86 pm_idle and default_idle Trinabh Gupta
2011-06-07 16:29 ` Trinabh Gupta
2011-06-07 16:29 ` [RFC PATCH V1 3/7] cpuidle: stop using pm_idle Trinabh Gupta
2011-08-03 17:45 ` Len Brown
2011-08-03 17:45 ` Len Brown
2011-08-03 17:45 ` Len Brown
2011-06-07 16:29 ` Trinabh Gupta
2011-06-07 16:30 ` [RFC PATCH V1 4/7] cpuidle: (powerpc) Add cpu_idle_wait() to allow switching idle routines Trinabh Gupta
2011-06-17 4:32 ` Benjamin Herrenschmidt [this message]
2011-06-17 4:32 ` Benjamin Herrenschmidt
2011-06-21 6:00 ` Trinabh Gupta
2011-06-21 6:00 ` Trinabh Gupta
2011-06-21 6:00 ` Trinabh Gupta
2011-06-17 4:32 ` Benjamin Herrenschmidt
2011-06-07 16:30 ` Trinabh Gupta
2011-06-07 16:30 ` [RFC PATCH V1 5/7] cpuidle: (POWER) cpuidle driver for pSeries Trinabh Gupta
2011-06-07 16:30 ` Trinabh Gupta
2011-06-17 4:36 ` Benjamin Herrenschmidt
2011-06-17 4:36 ` Benjamin Herrenschmidt
2011-06-21 9:00 ` Trinabh Gupta
2011-06-21 9:00 ` Trinabh Gupta
2011-06-21 9:00 ` Trinabh Gupta
2011-06-17 4:36 ` Benjamin Herrenschmidt
2011-06-07 16:30 ` [RFC PATCH V1 6/7] cpuidle: (POWER) Enable cpuidle and directly call cpuidle_idle_call() " Trinabh Gupta
2011-06-07 16:30 ` Trinabh Gupta
2011-06-07 16:30 ` [RFC PATCH V1 7/7] cpuidle: (POWER) Handle power_save=off Trinabh Gupta
2011-06-07 16:30 ` Trinabh Gupta
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=1308285128.32158.8.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=trinabh@linux.vnet.ibm.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.