From: Jerone Young <jyoung5@us.ibm.com>
To: Tony Breeds <tony@bakeyournoodle.com>
Cc: kvm-ppc-devel@lists.sourceforge.net, linuxppc-dev@ozlabs.org
Subject: Re: [kvm-ppc-devel] [PATCH] Add idle wait support for 44x platforms
Date: Fri, 04 Apr 2008 06:12:38 +0000 [thread overview]
Message-ID: <1207289558.6971.15.camel@thinkpadL> (raw)
In-Reply-To: <20080403230356.GJ20457@bakeyournoodle.com>
On Fri, 2008-04-04 at 10:03 +1100, Tony Breeds wrote:
> On Thu, Apr 03, 2008 at 05:43:02PM -0500, Jerone Young wrote:
>
> Hi Jerone,
> A few minor nits.
> > Add idle wait support for 44x platforms
> >
> > This patch adds the ability for the CPU to go into wait state while in cpu_idle loop. This helps virtulization solutions know when the guest Linux kernel is in an idle state. There are two ways to do it.
> >
> > 1) Command line
> > idle=spin <-- CPU will spin (this is the default)
> > idle=wait <-- set CPU into wait state when idle
> >
> > 2) The device tree will be checked for the "/hypervisor" node
> > If this node is seen it will use "wait" for idle, so that
> > the hypervisor can know when guest Linux kernel it is in
> > an idle state.
> >
> > This patch, unlike the last, isolates the code to 44x platforms.
> >
> > Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
>
> Can you include a diffstat in here?
I think there is a way. I can see if I can do it. Though I may have to
do it out side of my normal hg tools.
>
> > +static int current_mode = 0;
>
> Leave this as: static int current_mode;, so it'll end up in the bss
The problem here is that this defines the default case. Is there really
a benefit having this in bss ?
>
> > +int __init ppc44x_idle_init(void)
> > +{
> > + if(of_find_node_by_path("/hypervisor") != NULL) {
> ^ space
> > + /* if we find /hypervisor node is in device tree,
> > + set idle mode to wait */
> > + current_mode = 1; /* wait mode */
> > + }
>
> You don't really need the braces {} here.
>
> > +static int __init idle_param(char *p)
> > +{
> > + int i;
> > +
> > + for (i = 0; i < sizeof(modes)/sizeof(struct sleep_mode); i++) {
>
> ARRAY_SIZE(modes)
I'll do this.
>
> Yours Tony
>
> linux.conf.au http://www.marchsouth.org/
> Jan 19 - 24 2009 The Australian Linux Technical Conference!
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jerone Young <jyoung5@us.ibm.com>
To: Tony Breeds <tony@bakeyournoodle.com>
Cc: kvm-ppc-devel@lists.sourceforge.net, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Add idle wait support for 44x platforms
Date: Fri, 04 Apr 2008 01:12:38 -0500 [thread overview]
Message-ID: <1207289558.6971.15.camel@thinkpadL> (raw)
In-Reply-To: <20080403230356.GJ20457@bakeyournoodle.com>
On Fri, 2008-04-04 at 10:03 +1100, Tony Breeds wrote:
> On Thu, Apr 03, 2008 at 05:43:02PM -0500, Jerone Young wrote:
>
> Hi Jerone,
> A few minor nits.
> > Add idle wait support for 44x platforms
> >
> > This patch adds the ability for the CPU to go into wait state while in cpu_idle loop. This helps virtulization solutions know when the guest Linux kernel is in an idle state. There are two ways to do it.
> >
> > 1) Command line
> > idle=spin <-- CPU will spin (this is the default)
> > idle=wait <-- set CPU into wait state when idle
> >
> > 2) The device tree will be checked for the "/hypervisor" node
> > If this node is seen it will use "wait" for idle, so that
> > the hypervisor can know when guest Linux kernel it is in
> > an idle state.
> >
> > This patch, unlike the last, isolates the code to 44x platforms.
> >
> > Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
>
> Can you include a diffstat in here?
I think there is a way. I can see if I can do it. Though I may have to
do it out side of my normal hg tools.
>
> > +static int current_mode = 0;
>
> Leave this as: static int current_mode;, so it'll end up in the bss
The problem here is that this defines the default case. Is there really
a benefit having this in bss ?
>
> > +int __init ppc44x_idle_init(void)
> > +{
> > + if(of_find_node_by_path("/hypervisor") != NULL) {
> ^ space
> > + /* if we find /hypervisor node is in device tree,
> > + set idle mode to wait */
> > + current_mode = 1; /* wait mode */
> > + }
>
> You don't really need the braces {} here.
>
> > +static int __init idle_param(char *p)
> > +{
> > + int i;
> > +
> > + for (i = 0; i < sizeof(modes)/sizeof(struct sleep_mode); i++) {
>
> ARRAY_SIZE(modes)
I'll do this.
>
> Yours Tony
>
> linux.conf.au http://www.marchsouth.org/
> Jan 19 - 24 2009 The Australian Linux Technical Conference!
>
next prev parent reply other threads:[~2008-04-04 6:12 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-03 22:43 [kvm-ppc-devel] [PATCH] Add idle wait support for 44x platforms Jerone Young
2008-04-03 22:43 ` Jerone Young
2008-04-03 23:03 ` [kvm-ppc-devel] " Tony Breeds
2008-04-03 23:03 ` Tony Breeds
2008-04-04 1:59 ` [kvm-ppc-devel] " Josh Boyer
2008-04-04 1:59 ` Josh Boyer
2008-04-04 6:12 ` Jerone Young [this message]
2008-04-04 6:12 ` Jerone Young
2008-04-04 11:47 ` [kvm-ppc-devel] " Josh Boyer
2008-04-04 11:47 ` Josh Boyer
2008-04-08 2:17 ` [kvm-ppc-devel] " Arnd Bergmann
2008-04-08 2:17 ` Arnd Bergmann
2008-04-08 2:31 ` [kvm-ppc-devel] " Josh Boyer
2008-04-08 2:31 ` Josh Boyer
2008-04-08 2:41 ` [kvm-ppc-devel] " Arnd Bergmann
2008-04-08 2:41 ` Arnd Bergmann
2008-04-08 2:44 ` [kvm-ppc-devel] " Josh Boyer
2008-04-08 2:44 ` Josh Boyer
2008-04-03 23:13 ` [kvm-ppc-devel] " Hollis Blanchard
2008-04-03 23:13 ` Hollis Blanchard
2008-04-04 0:17 ` Scott Wood
2008-04-04 0:17 ` Scott Wood
2008-04-04 6:15 ` Jerone Young
2008-04-04 6:15 ` Jerone Young
2008-04-04 2:00 ` Josh Boyer
2008-04-04 2:00 ` Josh Boyer
2008-04-04 5:59 ` [kvm-ppc-devel] " Jerone Young
2008-04-04 5:59 ` Jerone Young
2008-04-04 14:33 ` [kvm-ppc-devel] " Hollis Blanchard
2008-04-04 14:33 ` Hollis Blanchard
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=1207289558.6971.15.camel@thinkpadL \
--to=jyoung5@us.ibm.com \
--cc=kvm-ppc-devel@lists.sourceforge.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=tony@bakeyournoodle.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.