public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <andi@firstfloor.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Dhaval Giani <dhaval@linux.vnet.ibm.com>,
	Venkatesch Pallipadi <venkatesh.pallipadi@intel.com>,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH] ACPI/CPUIDLE: prevent setting pm_idle to NULL
Date: Mon, 28 Jul 2008 21:53:24 +0200	[thread overview]
Message-ID: <20080728195324.GE30344@one.firstfloor.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0807282107500.14925@apollo.tec.linutronix.de>

> The problem here is that the acpi/cpuidle code can be in a state where
> the _save/old variables _ARE_ NULL because they had not been
> initialized with the original pm_idle before the module is removed or
> the cst state changes. So all we have to do is to prevent pm_idle to
> be set to NULL.

It still seems wrong to me to fall back to the cpuidle idle function
instead of the earlier idle function just because cpuidle was loaded
in a weird way. 

But yes mwait_idle could be set up later after the saving state.
I suggested default_idle because it is safe, but yes it is probably
not the optimal choice.

Perhaps to solve this cleanly we really need to go to a hierarchy
of idle functions registered with priority instead of this fragile
pointer saving/restoring. 

-Andi

  reply	other threads:[~2008-07-28 19:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-27 21:47 [PATCH] ACPI/CPUIDLE: prevent setting pm_idle to NULL Thomas Gleixner
2008-07-28 17:46 ` Andi Kleen
2008-07-28 19:38   ` Thomas Gleixner
2008-07-28 19:53     ` Andi Kleen [this message]
2008-07-28 21:51       ` Thomas Gleixner
2008-07-28 22:05       ` Pallipadi, Venkatesh

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=20080728195324.GE30344@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhaval@linux.vnet.ibm.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox