public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kapm-idled Funny in 2.4.10-ac12?
@ 2001-10-12 14:12 Kent Borg
  2001-10-12 14:21 ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Kent Borg @ 2001-10-12 14:12 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Not that it so far appears to be a problem, but where kapm-idled used
to wait a tad after activity and then apparently gobble up all the
extra CPU cycles (in 2.4.10-ac1) I now notice that xosview is showing
CPU usage when things are quiet as hopping up and down, and top is
reporting kapm-idled CPU usage as in the mid to high 50 percent range.

Under 2.4.10-ac1 top used to put kapm-idled in the very high 90
percent range.

Does this mean my laptop will get less battery life?


Thanks,

-kb, the Kent with too wimpy a battery as it is.


P.S.  I am on a Sony Viao PCG-Z505LE.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kapm-idled Funny in 2.4.10-ac12?
  2001-10-12 14:12 kapm-idled Funny in 2.4.10-ac12? Kent Borg
@ 2001-10-12 14:21 ` Alan Cox
  2001-10-12 14:32   ` Peter T. Breuer
  2001-10-12 14:35   ` Kent Borg
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Cox @ 2001-10-12 14:21 UTC (permalink / raw)
  To: Kent Borg; +Cc: Alan Cox, linux-kernel

> extra CPU cycles (in 2.4.10-ac1) I now notice that xosview is showing
> CPU usage when things are quiet as hopping up and down, and top is
> reporting kapm-idled CPU usage as in the mid to high 50 percent range.
> 
> Under 2.4.10-ac1 top used to put kapm-idled in the very high 90
> percent range.
> 
> Does this mean my laptop will get less battery life?

Is your laptop logging messages in the process ? (dmesg)

One thing I changed in -ac was to do sane things when the apm idle request
comes back with "no" from the BIOS

Alan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kapm-idled Funny in 2.4.10-ac12?
  2001-10-12 14:21 ` Alan Cox
@ 2001-10-12 14:32   ` Peter T. Breuer
  2001-10-12 14:35   ` Kent Borg
  1 sibling, 0 replies; 5+ messages in thread
From: Peter T. Breuer @ 2001-10-12 14:32 UTC (permalink / raw)
  To: linux kernel

"Alan Cox wrote:"
> One thing I changed in -ac was to do sane things when the apm idle request
> comes back with "no" from the BIOS

HURRAY!!!!

Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kapm-idled Funny in 2.4.10-ac12?
  2001-10-12 14:21 ` Alan Cox
  2001-10-12 14:32   ` Peter T. Breuer
@ 2001-10-12 14:35   ` Kent Borg
  1 sibling, 0 replies; 5+ messages in thread
From: Kent Borg @ 2001-10-12 14:35 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

On Fri, Oct 12, 2001 at 03:21:57PM +0100, Alan Cox wrote:
> Is your laptop logging messages in the process ? (dmesg)

No.  I don't see any ongoing logging from apm.  Looking at dmesg I see
boot stuff about battery minutes having swapped bytes, some version
and flag printk's, but no current logging.

In /var/spool/messages I also see mention of the times I have
suspended and awakened my laptop, but no other ongoing loggin there
either.

> One thing I changed in -ac was to do sane things when the apm idle request
> comes back with "no" from the BIOS

I had noticed that comment, which made me think it might be of
specific interest.


Thanks,

-kb


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kapm-idled Funny in 2.4.10-ac12?
       [not found] <20011012193019.A612@linux.uib.es>
@ 2001-10-12 18:08 ` Alan Cox
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Cox @ 2001-10-12 18:08 UTC (permalink / raw)
  To: gallir; +Cc: linux-kernel, alan

> I am having almost the same problem in 2.4.12-ac1:
> 
> gallir@linux:~$ uname -a
> Linux linux 2.4.12-ac1 #2 Fri Oct 12 19:01:03 CEST 2001 i686 unknown
> 
> kapm-idled consumes a 14% of CPU (in a P3 1GHz)
> 
> PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
>   3 root      17   0     0    0     0 RW   14.3  0.0   1:17 kapm-idled
> 
> The same happens with vanilla Linus tree (tested up to 2.4.11). In a P2,
> CPU consuption was more than 85%.
> 
> The CPU's temperature, while the system idle, is more than 4 degrees (C)
> higher than the same conditions with the kapm-idled disabled.

I've been reading throught the APM spec and code a bit further. The more
I read the more I wonder quite how our idle code is meant to work and what
kind of beer was overconsumed during its writing.

There are two glaring issues I can see right now

#1	The BIOS might sleep for a tick, but it is also is allowed to slow
	the cpu and return straight back to us.

	If it returns back to us we spin in a tight loop at the lower clock
	speed calling the APM bios. Not ideal.

	Just fixed that in my tree for the next -ac

#2	We test system_idle() nr_running==1, but we spent all our time 
	pretending we aren't running. Im not 100% sure the test is safe
	yet

Alan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-10-12 18:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-12 14:12 kapm-idled Funny in 2.4.10-ac12? Kent Borg
2001-10-12 14:21 ` Alan Cox
2001-10-12 14:32   ` Peter T. Breuer
2001-10-12 14:35   ` Kent Borg
     [not found] <20011012193019.A612@linux.uib.es>
2001-10-12 18:08 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox