public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-pm@lists.linux-foundation.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH] CPUidle: always return with interrupts enabled
Date: Tue, 6 Oct 2009 13:34:56 -0700	[thread overview]
Message-ID: <20091006133456.5177a32a.akpm@linux-foundation.org> (raw)
In-Reply-To: <200909302321.33088.rjw@sisk.pl>

On Wed, 30 Sep 2009 23:21:33 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> On Wednesday 30 September 2009, Kevin Hilman wrote:
> > In the case where cpuidle_idle_call() returns before changing state
> > due to a need_resched(), it was returning with IRQs disabled.
> > 
> > This patch ensures IRQs are (re)enabled before returning.
> 
> Venki, any comments on this?

Rigor mortis is setting in on this one.

Venki's most recent linux-acpi email was on July 31.

> > Reported-by: Hemanth V <hemanthv@ti.com>
> > Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> > ---
> >  drivers/cpuidle/cpuidle.c |    5 ++++-
> >  1 files changed, 4 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> > index ad41f19..12fdd39 100644
> > --- a/drivers/cpuidle/cpuidle.c
> > +++ b/drivers/cpuidle/cpuidle.c
> > @@ -76,8 +76,11 @@ static void cpuidle_idle_call(void)
> >  #endif
> >  	/* ask the governor for the next state */
> >  	next_state = cpuidle_curr_governor->select(dev);
> > -	if (need_resched())
> > +	if (need_resched()) {
> > +		local_irq_enable();
> >  		return;
> > +	}
> > +
> >  	target_state = &dev->states[next_state];
> >  
> >  	/* enter the state and update stats */

The patch seems correct to me.  The code is hopelessly poorly
documented as per usual, but other paths in that function, including
the call to target_state->enter() (which devolves to default_idle) also
enable interrupts.

Kevin, the changelog is not good.  It tells us what was wrong with the
code but does not describe the user-visible effects of the bug.

I'm unable to find any bug report from Hemanth so I'm all in the dark.

Your cc to linux-omap makes me suspect that <whatever the problem was>
was exhibited on a non-x86 platform, under some circumstances.  Perhaps
that explains (for unknown reasons) why <whatever the problem was> was
not observed on x86.  But I'm totally in the dark and grasping for
clues and have no way of determining (for example) whether we should
backport the fix to earlier kernels.


Please send along the additional information?

  parent reply	other threads:[~2009-10-06 20:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1254332153-23493-1-git-send-email-khilman@deeprootsystems.com>
2009-09-30 21:21 ` [PATCH] CPUidle: always return with interrupts enabled Rafael J. Wysocki
     [not found] ` <200909302321.33088.rjw@sisk.pl>
2009-10-06 20:34   ` Andrew Morton [this message]
2009-10-06 21:02     ` Kevin Hilman
2009-10-16 16:25     ` Martin Michlmayr
     [not found]     ` <20091016162504.GC1391@deprecation.cyrius.com>
2009-10-16 21:11       ` Andrew Morton
2009-09-30 17:35 Kevin Hilman

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=20091006133456.5177a32a.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rjw@sisk.pl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox