All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	len.brown@intel.com, tglx@linutronix.de, jeremy@goop.org,
	hpa@zytor.com, bp@alien8.de, tj@kernel.org, trenn@suse.de,
	mingo@redhat.com, xen-devel@lists.xensource.com,
	stable@kernel.org
Subject: Re: [PATCH 1/3] cpuidle: If disable_cpuidle() is called, set pm_idle to default_idle.
Date: Wed, 9 Nov 2011 09:44:41 -0500	[thread overview]
Message-ID: <20111109144440.GB8410@phenom.dumpdata.com> (raw)
In-Reply-To: <4EBA53C5.9040603@linux.vnet.ibm.com>

. snip..
> > 
> >      ..scribble on pm_idle and access default_idle,
> >     have it simply disable_cpuidle() so acpi_idle will not load and
> >     architecture default HLT will be used.
> > 
> > .. but the default HLT does not get used. Instead we end up in the

Hey Deepthi,

> > +	if (cpuidle_disabled()) {
> > +		pm_idle = default_idle;
> > +		return;
> > +	}
> 
> 
> The above check is needed to initialise pm_idle to default_idle if
> cpuidle is disabled but this requirement here is Zen specific. 
> On other architectures, if cpuidle is disabled on boot then we 
> rather would want mwait_idle or amd_e400_idle to be enabled than 
> default_idle. Can we make this check Zen specific ? 

We do? Why? I would have thought that if you want to disable the cpuidle
you would want the default_idle. 

Perhaps there is another way do this is:

diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index becd6d9..04b10a4 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -38,6 +38,7 @@ int cpuidle_disabled(void)
 void disable_cpuidle(void)
 {
 	off = 1;
+	pm_idle = default_idle;
 }

which would do almost the same thing as this patch (well, except
that if you run cpuidle.off=1 you still end up with amd_e400_idle
instead of default_idle, so it is not the complete solution).

> 
> ...  if(ZEN_ARCH && cpuidle_disabled()) ... 

That would not work very well. For one thing you would need to call
'xen_domain()', and pull in a lots of header files. Second of, it
looks quite ugly and kernel folks like pretty code.

  parent reply	other threads:[~2011-11-09 15:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 21:15 [PATCH] x86/acpi fixes for 3.2 (v1) impacting distributions Konrad Rzeszutek Wilk
2011-11-08 21:15 ` [PATCH 1/3] cpuidle: If disable_cpuidle() is called, set pm_idle to default_idle Konrad Rzeszutek Wilk
2011-11-09 10:19   ` Deepthi Dharwar
2011-11-09 10:51     ` Deepthi Dharwar
2011-11-09 14:44     ` Konrad Rzeszutek Wilk [this message]
2011-11-11 11:41       ` Deepthi Dharwar
2011-11-15 14:40         ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-11-22 13:46           ` Konrad Rzeszutek Wilk
2011-11-23 11:06             ` Deepthi Dharwar
2011-11-10  4:06   ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-11-13  6:00     ` Len Brown
2011-11-13  6:00       ` Len Brown
2011-11-14 14:37       ` [Xen-devel] " Konrad Rzeszutek Wilk
2011-11-14 14:37         ` Konrad Rzeszutek Wilk
2011-11-08 21:15 ` [PATCH 2/3] x86/cpa: Use pte_attrs instead of pte_flags on CPA/set_p.._wb/wc operations Konrad Rzeszutek Wilk
2011-12-02 23:31   ` Konrad Rzeszutek Wilk
2011-11-08 21:15 ` [PATCH 3/3] x86/paravirt: Use pte_val instead of pte_flags on CPA pageattr_test Konrad Rzeszutek Wilk

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=20111109144440.GB8410@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=bp@alien8.de \
    --cc=deepthi@linux.vnet.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=stable@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=trenn@suse.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xensource.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.