All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Larsson <roger.larsson@skelleftea.mail.telia.com>
To: Christian Vogel <vogel@skunk.physik.uni-erlangen.de>,
	linux-kernel@vger.kernel.org
Cc: Robert Love <rml@tech9.net>
Subject: Re: linux-2.6.0-test2: Never using pm_idle (CPU wasting power)
Date: Fri, 1 Aug 2003 00:45:08 +0200	[thread overview]
Message-ID: <200308010045.08178.roger.larsson@skelleftea.mail.telia.com> (raw)
In-Reply-To: <20030731150722.A5938@skunk.physik.uni-erlangen.de>

On Thursday 31 July 2003 15.07, Christian Vogel wrote:
> Hi,
>
> on a Thinkpad 600X I noticed the CPU getting very hot. It turned
> out that pm_idle was never called (which invokes the ACPI pm_idle
> call in this case) and default_idle was used instead.
>
> 	/* arch/i386/kernel/process.c, line 723 */
> 	void cpu_idle (void)
> 	{
> 		/* endless idle loop with no priority at all */
> 		while (1) {
> 			void (*idle)(void) = pm_idle;
> 			if (!idle)
> 				idle = default_idle; /* once on bootup */
> 			irq_stat[smp_processor_id()].idle_timestamp = jiffies;
> 			while (!need_resched())
> 				idle();
> 			schedule();  /* never reached */
> 		}
> 	}
>
> The schedule() is never reached (need_resched() is never 0) and
> so the idle-variable is not updated. pm_idle is NULL on the
> first call to cpu_idle on this thinkpad, and so I stay idling
> in the default_idle()-function.
>

This smells preemptive kernel, correct?

> By moving the "void *idle = pm_idle; if(!idle)..." in the inner
> while()-loop the notebook calls pm_idle (as it get's updated by ACPI)
> and stays cool.
>

/RogerL

-- 
Roger Larsson
Skellefteå
Sweden

  parent reply	other threads:[~2003-07-31 22:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31 13:07 linux-2.6.0-test2: Never using pm_idle (CPU wasting power) Christian Vogel
2003-07-31 14:12 ` Charles Lepple
2003-07-31 14:44   ` Christian Vogel
2003-07-31 22:45 ` Roger Larsson [this message]
2003-07-31 22:58   ` Robert Love
2003-07-31 23:26     ` Robert Love
2003-07-31 22:59 ` Andrew Morton
2003-08-01  9:18   ` Christian Vogel

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=200308010045.08178.roger.larsson@skelleftea.mail.telia.com \
    --to=roger.larsson@skelleftea.mail.telia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=vogel@skunk.physik.uni-erlangen.de \
    /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.