From: Steven Rostedt <rostedt@goodmis.org>
To: Andrew Morton <akpm@osdl.org>
Cc: mingo@elte.hu, acpi-devel@lists.sourceforge.net,
len.brown@intel.com, nando@ccrma.Stanford.EDU,
rlrevell@joe-job.com, linux-kernel@vger.kernel.org,
paulmck@us.ibm.com, kr@cybsft.com, tglx@linutronix.de,
pluto@agmk.net, john.cooper@timesys.com, bene@linutronix.de,
dwalker@mvista.com, trini@kernel.crashing.org, george@mvista.com
Subject: Re: [RFC][PATCH] Runtime switching of the idle function [take 2]
Date: Mon, 28 Nov 2005 22:42:20 -0500 [thread overview]
Message-ID: <1133235740.6328.27.camel@localhost.localdomain> (raw)
In-Reply-To: <20051128190253.1b7068d6.akpm@osdl.org>
On Mon, 2005-11-28 at 19:02 -0800, Andrew Morton wrote:
> Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > This patch creates a directory in /sys/kernel called idle.
> >
>
> At no point do you appear to explain _why_ the kernel needs this feature?
Sorry about that. This originally came up when we had problems with the
AMD64 x2 in the -rt patch. It was noted that the TSCs would get very
far out of sync and cause problems. The way to solve this was to set
idle=poll. The original patch I sent was to allow the user to change to
idle=poll dynamically. This way they could switch to the poll_idle and
run there tests (requiring tsc not to drift) and then switch back to the
default idle to save on electricity.
Note: It's been stated that the tsc drift can cause problems with the
vanilla kernel too.
Ingo asked if I could make this more robust and not dependent on
idle_poll.
Maybe Ingo can give a better explanation?
>
> > ...
> > - pm_idle = pm_idle_save;
> > + int tries = 0;
> > + int ret;
> > + set_idle(NULL);
> > + do {
> > + if ((ret = unregister_idle(PM_IDLE_NAME)) == 0)
> > + break;
> > + /*
> > + * for some reason the idle function is being used.
> > + * Wait a little and then try again.
> > + */
> > + if (ret == -EINVAL) {
> > + printk(KERN_WARNING
> > + "ACPI idle function never registered?\n");
> > + break;
> > + }
> > + yield();
> > + } while (tries++ < 10);
>
> The use of yield() could be problematic - its semantics are rather
> ill-defined. Maybe msleep(1) or something?
>
> What's this loop here for anyway? Looks kludgy.
Oops! That was required by some other garbage that I had earlier. I
cleaned up the patch some more, and this is no longer required. (will
remove).
>
> > + if (tries > 10) {
> > + printk(KERN_WARNING
> > + "Unable to unresgister ACPI idle function\n");
>
> tpyo
Will fix.
>
> > + memset(&idle_kobj, 0, sizeof(idle_kobj));
>
> There are several memsets of statically allocated structures which are
> already all-zero.
>
:) I'm really paranoid! OK, I always like to do a memset even when it's
not needed. I'll purge them too.
Thanks for having a look.
-- Steve
next prev parent reply other threads:[~2005-11-29 3:42 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-15 9:08 2.6.14-rt13 Ingo Molnar
2005-11-15 16:36 ` 2.6.14-rt13 Mark Knecht
2005-11-15 19:57 ` 2.6.14-rt13 Paul E. McKenney
2005-11-16 3:48 ` 2.6.14-rt13 K.R. Foley
2005-11-16 8:40 ` 2.6.14-rt13 Ingo Molnar
2005-11-16 17:02 ` 2.6.14-rt13 Paul E. McKenney
2005-11-18 18:02 ` 2.6.14-rt13 Fernando Lopez-Lezcano
2005-11-18 21:54 ` 2.6.14-rt13 Lee Revell
2005-11-18 22:05 ` 2.6.14-rt13 Fernando Lopez-Lezcano
2005-11-18 22:07 ` 2.6.14-rt13 Ingo Molnar
2005-11-18 22:15 ` 2.6.14-rt13 Lee Revell
2005-11-18 22:25 ` 2.6.14-rt13 Steven Rostedt
2005-11-18 23:36 ` 2.6.14-rt13 Fernando Lopez-Lezcano
2005-11-18 23:57 ` 2.6.14-rt13 Steven Rostedt
2005-11-18 22:41 ` 2.6.14-rt13 Fernando Lopez-Lezcano
2005-11-19 2:39 ` 2.6.14-rt13 Steven Rostedt
2005-11-24 15:07 ` 2.6.14-rt13 Ingo Molnar
2005-11-24 15:21 ` 2.6.14-rt13 Steven Rostedt
2005-11-25 20:56 ` [RFC][PATCH] Runtime switching to idle_poll (was: Re: 2.6.14-rt13) Steven Rostedt
2005-11-26 13:05 ` Ingo Molnar
2005-11-29 2:48 ` [RFC][PATCH] Runtime switching of the idle function [take 2] Steven Rostedt
2005-11-29 3:02 ` Andrew Morton
2005-11-29 3:42 ` Steven Rostedt [this message]
2005-11-29 4:01 ` Andrew Morton
2005-11-29 6:44 ` Ingo Molnar
2005-11-29 6:55 ` Nick Piggin
2005-11-29 18:05 ` Andi Kleen
2005-11-29 14:19 ` Steven Rostedt
2005-11-29 14:50 ` Andi Kleen
2005-11-29 15:42 ` Steven Rostedt
2005-12-02 1:27 ` Max Krasnyansky
2005-12-02 1:45 ` Andi Kleen
2005-12-03 2:17 ` Max Krasnyansky
2005-11-29 4:22 ` john stultz
2005-11-29 14:22 ` Steven Rostedt
2005-11-29 13:08 ` Pavel Machek
2005-12-18 15:26 ` Steven Rostedt
2005-11-18 22:13 ` 2.6.14-rt13 Lee Revell
2005-11-18 22:32 ` 2.6.14-rt13 Vojtech Pavlik
2005-11-19 2:28 ` 2.6.14-rt13 George Anzinger
2005-11-19 7:45 ` 2.6.14-rt13 Vojtech Pavlik
2005-11-19 18:27 ` 2.6.14-rt13 Lee Revell
2005-11-21 21:32 ` 2.6.14-rt13 Fernando Lopez-Lezcano
2005-11-21 21:41 ` 2.6.14-rt13 john stultz
[not found] ` <20051121221511.GA7255@elte.hu>
2005-11-21 22:19 ` test time-warps [was: Re: 2.6.14-rt13] Ingo Molnar
2005-11-21 23:08 ` Fernando Lopez-Lezcano
2005-11-21 23:38 ` Fernando Lopez-Lezcano
2005-11-21 23:41 ` john stultz
2005-11-22 1:31 ` Lee Revell
2005-11-22 1:15 ` Steven Rostedt
2005-11-22 11:16 ` Ingo Molnar
2005-11-22 17:49 ` Fernando Lopez-Lezcano
2005-11-22 18:01 ` Christopher Friesen
2005-11-22 18:22 ` Steven Rostedt
2005-11-22 20:52 ` Ingo Molnar
2005-11-22 11:19 ` 2.6.14-rt13 Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2005-11-29 19:37 [RFC][PATCH] Runtime switching of the idle function [take 2] Brown, Len
2005-11-29 19:37 ` Brown, Len
2005-11-29 19:53 ` Andi Kleen
2005-11-29 20:35 ` Lee Revell
2005-11-29 20:51 ` Andi Kleen
2005-11-29 23:55 ` Lee Revell
2005-11-30 1:06 ` Andi Kleen
2005-11-30 1:22 ` Lee Revell
2005-11-30 1:58 ` Andi Kleen
2005-11-30 2:19 ` john stultz
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=1133235740.6328.27.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=acpi-devel@lists.sourceforge.net \
--cc=akpm@osdl.org \
--cc=bene@linutronix.de \
--cc=dwalker@mvista.com \
--cc=george@mvista.com \
--cc=john.cooper@timesys.com \
--cc=kr@cybsft.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nando@ccrma.Stanford.EDU \
--cc=paulmck@us.ibm.com \
--cc=pluto@agmk.net \
--cc=rlrevell@joe-job.com \
--cc=tglx@linutronix.de \
--cc=trini@kernel.crashing.org \
/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.