linux-2.6.0-test2: Never using pm_idle (CPU wasting power)

From: Christian Vogel (vogel_at_skunk.physik.uni-erlangen.de)
Date: 07/31/03

  • Next message: Jan-Benedict Glaw: "Re: Emulating i486 on i386 (was: TSCs are a no-no on i386)"
    Date:	Thu, 31 Jul 2003 15:07:22 +0200
    To: linux-kernel@vger.kernel.org
    
    

    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.

    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.

            Chris

    -- 
    Programming today is a race between software engineers striving to build
    bigger and better idiot-proof programs, and the Universe trying to
    produce bigger and better idiots.  So far, the Universe is winning.
     -- Rich Cook
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Jan-Benedict Glaw: "Re: Emulating i486 on i386 (was: TSCs are a no-no on i386)"

    Relevant Pages

    • Re: suspend/hibernation regression between 2.6.19 and 2.6.20 w/ Thinkpad T41
      ... Now pressing doesn't wake up the system, I have to press the power button ... the same as a cold boot in a given thinkpad model? ... BIOS fixes in the past were releated to such problems, ... probably some ACPI state is being lost by the BIOS because of the ...
      (Linux-Kernel)
    • Re: [PATCH] DMI: Decode and save OEM String information
      ... The ThinkPad ACPI tables do list the relevant IO ports ... ThinkPad models, ... The OEM string table used by IBM is quite stable. ...
      (Linux-Kernel)
    • Re: [PATCH][help?] Radeonfb acpi resume
      ... > The above will probably blow up anything that is not an x86 with ACPI. ... > Besides there is already a mecanism in that file for calling functions ... Oregon State University ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH][help?] Radeonfb acpi resume
      ... The above will probably blow up anything that is not an x86 with ACPI. ... Besides there is already a mecanism in that file for calling functions ... for re-posting cards (since I have code to explicitely re-post rv280 and ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: current iso snapshots
      ... My Thinkpads work OK, but you can't use ACPI on ... them with the default DSDT. ... Press Space at the boot loader countdown, ... Your Thinkpad should then boot OK. ...
      (freebsd-current)