kapm-idled no longer idling CPU?

kapm-idled no longer idling CPU?

Post by Andreas Steinmet » Sat, 01 Dec 2001 21:40:10




Quote:>> application that uses more than very minor system resources is running,
>> (i.e. mozilla, netscape, xemacs, apache, Tomcat, just to name a few
>> common ones I've seen this behaviour with) kapm-idled no longer receives
>> scheduling time from what I can tell and I assume that means my CPU is
>> never getting idled when nothing is scheduled.

> kapm_idled will get scheduling time when there is nothing else to run,
> whether it wants it or is using it is more of the question.

Well, that's exactly the problem. in apm_mainloop the following happens:

                timeout = 2 * timeout;
                if (timeout > APM_CHECK_TIMEOUT)
                        timeout = APM_CHECK_TIMEOUT;
                schedule_timeout(timeout);

...

                if (!system_idle())
                        continue;

...

if (apm_do_idle() != -1) {

...

                        timeout = 1;
                }

This just means that after a busy condition we start at 1 and increase the
scheduling delay until the timeout reaches HZ.

system_idle itself just checks, if nr_running is 1. This means that if any
single other process is runnable every HZ time when apm_idled checks the system
state it won't switch to idle state even if the system is otherwise idle. I do
see this behaviour e.g. all the time with KDE.

Just create a process that does a select timeout every HZ and down the drain
goes your laptop battery, when the select call meets kapm-idled polling time.

Andreas Steinmetz
D.O.M. Datenverarbeitung GmbH
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

kapm-idled no longer idling CPU?

Post by Borsenkow Andre » Sat, 01 Dec 2001 22:00:15


Quote:

> I'm pretty sure this is a legit problem and not just kapm-idled
> reporting its time incorrectly since my laptop has gone from about
2-1/2
> hours of battery life in early 2.4 versions to less than 1 hour of
> battery life under the same conditions for recent kernels. Plus, if I
> exit everything until I'm just sitting at a shell prompt, I'll see
> kapm-idled start to receive time again. (Of course, the laptop isn't
> much fun when it's not running anything...)

I confirm this. I have two types of gkrellm reports:

28C CPU temperature/0% CPU load
31C CPU temperature/50% CPU load system

(well, in the average :-)

In the latter case I see kapm-idled using exactly these 50% CPU.

Quote:> I've seen this on a number of laptops and desktop machines since about
> 2.4.9 or so.

It was in all Mandrake 2.4.+ kernels I remember; I still have
2.4.8-31.1mdk, I'll try it.

-andrej
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

kapm-idled no longer idling CPU?

Post by Alan Co » Sat, 01 Dec 2001 22:20:14


Quote:> system_idle itself just checks, if nr_running is 1. This means that if any
> single other process is runnable every HZ time when apm_idled checks the system
> state it won't switch to idle state even if the system is otherwise idle. I do
> see this behaviour e.g. all the time with KDE.

Uggh - yes, that makes horrible sense. Does it behave any better if you
check say load average for the past 15 seconds < .1 ?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
 
 
 

kapm-idled no longer idling CPU?

Post by Tim Connor » Wed, 05 Dec 2001 09:00:29



> I posted this question about a month ago, but haven't seen a response
> since, so I'm reposting.

> I'm having a problem with all recent 2.4 systems that when any
> application that uses more than very minor system resources is running,
> (i.e. mozilla, netscape, xemacs, apache, Tomcat, just to name a few
> common ones I've seen this behaviour with) kapm-idled no longer receives
> scheduling time from what I can tell and I assume that means my CPU is
> never getting idled when nothing is scheduled.

I always had that problem though. Doesn't it only set kapmd-idled running
if the CPU has been idle for at least 1/3 second, though?

Quote:> I'm pretty sure this is a legit problem and not just kapm-idled
> reporting its time incorrectly since my laptop has gone from about 2-1/2
> hours of battery life in early 2.4 versions to less than 1 hour of
> battery life under the same conditions for recent kernels.  Plus, if I
> exit everything until I'm just sitting at a shell prompt, I'll see
> kapm-idled start to receive time again.  (Of course, the laptop isn't
> much fun when it's not running anything...)

> I've seen this on a number of laptops and desktop machines since about
> 2.4.9 or so.

Mmmm, my dell insp. 4000 is now running at 53 degrees (2.4.16 - mozilla
and xemacs open) - it used to run a lot cooler, even with just 2.4.13-ac4.
This is with me doing absolutely nothing.

And integrated over the uptime of the laptop, kapmd-idled seems to only be
using about 30% CPU compared to the old 50% (and 90% with an old kernel -
but that could have been that bug detected a while back)

Of course, I just remembered we have just entered summer, and this room is
damn hot - but I wouldn't expect a laptop getting so hot it needs to turn
the fan on, when doing _nothing_!

--
TimC -- http://www.physics.usyd.edu.au/~tcon/

The other day I overheard that a friend of the family had called their
new kid "Noah". I thinks "Noah? I 'ardly -" and then I bursts out
laughing..  -- Screwtape in RHOD

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. kapm-idled shows 90+% cpu usage when idle

Do you have CONFIG_APM_CPU_IDLE=y in your .config? If so, disable it.

There was a thread about this problem some months ago. I found
that on all of my APM-capable machines, including a Dell laptop,
CONFIG_APM_CPU_IDLE=y had a negative effect. The kernel ended up
in a tight loop performing tons of APM IDLE BIOS calls, since each
BIOS call returned immediately without having idled the CPU.

Leaving CONFIG_APM_CPU_IDLE unset lets the kernel use its own
"HLT when idle" code. On my main development box, idle CPU
temperature dropped >10 degrees C, and kapm-idled now uses 0% CPU.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Sort-of workaround for Via pro133a IDE interrupt loss

3. Why kapm-idled occupies 70% of my CPU time?

4. xf86quake under Xfree 3.2

5. kapm-idled using 45% CPU (why not 100%?)

6. IDE via PCI not working

7. 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time

8. HElp me write a driver

9. Q: "kapm-idled" and CPU usage

10. disabling the kapm-idled process

11. kapm-idled ???

12. What is kapm-idled?

13. kapm-idled problem