I think you're confusing "charged to" with "using" - read the paragraph a
bit more carefully. The kernel has a facility to call the BIOS IDLE function
with APM enabled when nothing else is happening - while in that BIOS call
CPU "ownership" is the kapm-idled task, and the time increments accordingly.
In reality, since the actual execution is in the BIOS IDLE routine, no CPU
consumption is occurring - the BIOS should be putting your machine into a
sleep state (If your BIOS is configured appropriately.)

Basically APM (and ACPI, for that matter) uses the systems' BIOS as the
arbiter and executor of power savings - rather than the kernel doing it
directly.

Hope this helps...
Gio

----- Original Message -----
From: "Bruce F. Press" <
[EMAIL PROTECTED]>
To: <
[EMAIL PROTECTED]>
Sent: Sunday, April 15, 2001 7:52 AM
Subject: Re: [Cooker] why does kapm-idled spin the cpu so often?


> Yes, yes, we've heard this before.  It is not a satisfactory answer,
> clearly the "idle" loop in kapm-idled could use a nice sleep(15) or
> something!!
>
>
> Chmouel Boudjnah wrote:
> >
> > SI Reasoning <
[EMAIL PROTECTED]> writes:
> >
> > > There are good stretches of the day where my CPU spins
> > > at around 50% or more and the process spinning is
> > > kapm-idled. This is not a problem in 7.2.
> >
> > --=-=-=
> >
http://www.tux.org/lkml/#s14-1:
> >
> > 1.Why is kapmd using so much CPU time?
> >         (REG) Don't worry, it's not stealing valuable CPU time from
> >         other processes. It's just consuming idle cycles (normally
> >         charged to the idle task, which is displayed differently in
> >         top).  Normally, when your system is idle, the system idle
> >         task is run, and this is shown as idle time (i.e. the "unused"
> >         CPU time is not charged to a specific process). With APM
> >         (Advanced Power Management), a special idle task (kapmd) is
> >         required so that greater power saving techniques can be
> >         enabled. So now, the "unused" CPU time is charged to the kapmd
> >         task instead.
> >
> > --=-=-=
> >
> > --=-=-=
> >
http://olstrans.sourceforge.net/release/OLS2000-apm/OLS2000-apm.html:
> >
> > In 2.2 and before, we basically had a hook into the idle loop, so that
> > if we had APM enabled, we would just tell the BIOS that we're
> > idle. In 2.3, Linus thought it would be a good idea if we had a
> > separate power management idle loop, so (he) we invented the
> > kernel APM daemon and I started getting bug reports about this
> > process that was using all our time, called kapmd. And if you sat
> > there just running top on a 2.3 kernel, the top process, if you're
> > not doing anything else, will be kapmd and it will be using like
> > 85% or 90% or 95% of your CPU time. These people were worried
> > because it was idle: why is it using all of the time? Well
> > actually, it's just that the time is getting accounted to that
> > process. It's not doing anything, it's the idle loop. [26m, 12s]
> > --=-=-=
> >
> > --
> > MandrakeSoft Inc                    
http://www.chmouel.org
> >                       --Chmouel

Reply via email to