Re: kapmd cpu usage

2000-10-14 Thread Thomas Graichen

Stephen Rothwell <[EMAIL PROTECTED]> wrote:
> Hi Rik,

> Rik van Riel <[EMAIL PROTECTED]> writes:
>> 
>> I have the idea we should really fix this dirty accounting
>> thing and properly account kapmd time to idle time.

> I got thinking about this and think I went slightly insane :-)

> How does the following look ... it makes kapmd equivalent to
> the idle processes as far as accounting for time is concerned.
> Top looks funny - kapmd is getting 96% of the CPU, but the
> CPU is 99.4% idle! :-)

i think this together with renaming kapm to "kapmidle" or "apm-idle"
should make an end to all this "kapm eats all of my cpu time"
confusion ...

t

-- 
[EMAIL PROTECTED]
technical director   innominate AG
clustering & securitynetworking people
tel: +49.30.308806-13  fax: -77   http://innominate.de
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: kapmd cpu usage

2000-10-09 Thread Stephen Rothwell

Hi Rik,

Rik van Riel <[EMAIL PROTECTED]> writes:
> 
> I have the idea we should really fix this dirty accounting
> thing and properly account kapmd time to idle time.

I got thinking about this and think I went slightly insane :-)

How does the following look ... it makes kapmd equivalent to
the idle processes as far as accounting for time is concerned.
Top looks funny - kapmd is getting 96% of the CPU, but the
CPU is 99.4% idle! :-)

Please tell me if I am crazy ...

Cheers,
Stephen
-- 
Stephen Rothwell, Open Source Researcher, Linuxcare, Inc.
+61-2-62628990 tel, +61-2-62628991 fax 
[EMAIL PROTECTED], http://www.linuxcare.com/ 
Linuxcare. Support for the revolution.

diff -ruN 2.4.0-test9/arch/alpha/kernel/process.c 
2.4.0-test9-APM/arch/alpha/kernel/process.c
--- 2.4.0-test9/arch/alpha/kernel/process.c Wed Oct  4 10:36:48 2000
+++ 2.4.0-test9-APM/arch/alpha/kernel/process.c Mon Oct  9 16:03:28 2000
@@ -76,6 +76,7 @@
/* An endless idle loop with no priority at all.  */
current->nice = 20;
current->counter = -100;
+   current->idle_proc = 1;
 
while (1) {
/* FIXME -- EV6 and LCA45 know how to power down
diff -ruN 2.4.0-test9/arch/arm/kernel/process.c 
2.4.0-test9-APM/arch/arm/kernel/process.c
--- 2.4.0-test9/arch/arm/kernel/process.c   Wed Oct  4 10:36:59 2000
+++ 2.4.0-test9-APM/arch/arm/kernel/process.c   Mon Oct  9 16:04:00 2000
@@ -87,6 +87,7 @@
init_idle();
current->nice = 20;
current->counter = -100;
+   current->idle_proc = 1;
 
while (1) {
void (*idle)(void) = pm_idle;
diff -ruN 2.4.0-test9/arch/i386/kernel/apm.c 2.4.0-test9-APM/arch/i386/kernel/apm.c
--- 2.4.0-test9/arch/i386/kernel/apm.c  Wed Oct  4 10:36:17 2000
+++ 2.4.0-test9-APM/arch/i386/kernel/apm.c  Mon Oct  9 16:15:13 2000
@@ -1426,6 +1426,7 @@
current->files = init_task.files;
atomic_inc(>files->count);
daemonize();
+   current->idle_proc = 1;
 
strcpy(current->comm, "kapmd");
sigfillset(>blocked);
diff -ruN 2.4.0-test9/arch/i386/kernel/process.c 
2.4.0-test9-APM/arch/i386/kernel/process.c
--- 2.4.0-test9/arch/i386/kernel/process.c  Wed Oct  4 10:36:59 2000
+++ 2.4.0-test9-APM/arch/i386/kernel/process.c  Mon Oct  9 16:05:42 2000
@@ -125,6 +125,7 @@
init_idle();
current->nice = 20;
current->counter = -100;
+   current->idle_proc = 1;
 
while (1) {
void (*idle)(void) = pm_idle;
diff -ruN 2.4.0-test9/arch/ia64/kernel/process.c 
2.4.0-test9-APM/arch/ia64/kernel/process.c
--- 2.4.0-test9/arch/ia64/kernel/process.c  Wed Oct  4 10:36:34 2000
+++ 2.4.0-test9-APM/arch/ia64/kernel/process.c  Mon Oct  9 16:06:23 2000
@@ -121,6 +121,7 @@
init_idle();
current->nice = 20;
current->counter = -100;
+   current->idle_proc = 1;
 
 
while (1) {
diff -ruN 2.4.0-test9/arch/m68k/kernel/process.c 
2.4.0-test9-APM/arch/m68k/kernel/process.c
--- 2.4.0-test9/arch/m68k/kernel/process.c  Wed Oct  4 10:36:48 2000
+++ 2.4.0-test9-APM/arch/m68k/kernel/process.c  Mon Oct  9 16:06:41 2000
@@ -83,6 +83,7 @@
init_idle();
current->nice = 20;
current->counter = -100;
+   current->idle_proc = 1;
idle();
 }
 
diff -ruN 2.4.0-test9/arch/mips/kernel/process.c 
2.4.0-test9-APM/arch/mips/kernel/process.c
--- 2.4.0-test9/arch/mips/kernel/process.c  Wed Oct  4 10:36:48 2000
+++ 2.4.0-test9-APM/arch/mips/kernel/process.c  Mon Oct  9 16:07:14 2000
@@ -36,6 +36,7 @@
/* endless idle loop with no priority at all */
current->nice = 20;
current->counter = -100;
+   current->idle_proc = 1;
init_idle();
 
while (1) {
diff -ruN 2.4.0-test9/arch/mips64/kernel/process.c 
2.4.0-test9-APM/arch/mips64/kernel/process.c
--- 2.4.0-test9/arch/mips64/kernel/process.cWed Oct  4 10:36:48 2000
+++ 2.4.0-test9-APM/arch/mips64/kernel/process.cMon Oct  9 16:07:43 2000
@@ -35,6 +35,7 @@
init_idle();
current->nice = 20;
current->counter = -100;
+   current->idle_proc = 1;
while (1) {
while (!current->need_resched)
if (wait_available)
diff -ruN 2.4.0-test9/arch/mips64/sgi-ip27/ip27-timer.c 
2.4.0-test9-APM/arch/mips64/sgi-ip27/ip27-timer.c
--- 2.4.0-test9/arch/mips64/sgi-ip27/ip27-timer.c   Wed Oct  4 10:37:00 2000
+++ 2.4.0-test9-APM/arch/mips64/sgi-ip27/ip27-timer.c   Mon Oct  9 16:14:10 2000
@@ -110,7 +110,7 @@
do_timer(regs);
 
 #ifdef CONFIG_SMP
-   if (current->pid) {
+   if (!current->idle_proc) {
unsigned int *inc, *inc2;
int user = user_mode(regs);
 
diff -ruN 2.4.0-test9/arch/ppc/kernel/idle.c 2.4.0-test9-APM/arch/ppc/kernel/idle.c
--- 2.4.0-test9/arch/ppc/kernel/idle.c  Wed Oct  4 10:37:00 2000
+++ 2.4.0-test9-APM/arch/ppc/kernel/idle.c  Mon Oct  9 16:08:23 2000
@@ -50,6 +50,7 @@
/* endless loop with 

Re: kapmd cpu usage

2000-10-09 Thread Stephen Rothwell

Hi Rik,

Rik van Riel [EMAIL PROTECTED] writes:
 
 I have the idea we should really fix this dirty accounting
 thing and properly account kapmd time to idle time.

I got thinking about this and think I went slightly insane :-)

How does the following look ... it makes kapmd equivalent to
the idle processes as far as accounting for time is concerned.
Top looks funny - kapmd is getting 96% of the CPU, but the
CPU is 99.4% idle! :-)

Please tell me if I am crazy ...

Cheers,
Stephen
-- 
Stephen Rothwell, Open Source Researcher, Linuxcare, Inc.
+61-2-62628990 tel, +61-2-62628991 fax 
[EMAIL PROTECTED], http://www.linuxcare.com/ 
Linuxcare. Support for the revolution.

diff -ruN 2.4.0-test9/arch/alpha/kernel/process.c 
2.4.0-test9-APM/arch/alpha/kernel/process.c
--- 2.4.0-test9/arch/alpha/kernel/process.c Wed Oct  4 10:36:48 2000
+++ 2.4.0-test9-APM/arch/alpha/kernel/process.c Mon Oct  9 16:03:28 2000
@@ -76,6 +76,7 @@
/* An endless idle loop with no priority at all.  */
current-nice = 20;
current-counter = -100;
+   current-idle_proc = 1;
 
while (1) {
/* FIXME -- EV6 and LCA45 know how to power down
diff -ruN 2.4.0-test9/arch/arm/kernel/process.c 
2.4.0-test9-APM/arch/arm/kernel/process.c
--- 2.4.0-test9/arch/arm/kernel/process.c   Wed Oct  4 10:36:59 2000
+++ 2.4.0-test9-APM/arch/arm/kernel/process.c   Mon Oct  9 16:04:00 2000
@@ -87,6 +87,7 @@
init_idle();
current-nice = 20;
current-counter = -100;
+   current-idle_proc = 1;
 
while (1) {
void (*idle)(void) = pm_idle;
diff -ruN 2.4.0-test9/arch/i386/kernel/apm.c 2.4.0-test9-APM/arch/i386/kernel/apm.c
--- 2.4.0-test9/arch/i386/kernel/apm.c  Wed Oct  4 10:36:17 2000
+++ 2.4.0-test9-APM/arch/i386/kernel/apm.c  Mon Oct  9 16:15:13 2000
@@ -1426,6 +1426,7 @@
current-files = init_task.files;
atomic_inc(current-files-count);
daemonize();
+   current-idle_proc = 1;
 
strcpy(current-comm, "kapmd");
sigfillset(current-blocked);
diff -ruN 2.4.0-test9/arch/i386/kernel/process.c 
2.4.0-test9-APM/arch/i386/kernel/process.c
--- 2.4.0-test9/arch/i386/kernel/process.c  Wed Oct  4 10:36:59 2000
+++ 2.4.0-test9-APM/arch/i386/kernel/process.c  Mon Oct  9 16:05:42 2000
@@ -125,6 +125,7 @@
init_idle();
current-nice = 20;
current-counter = -100;
+   current-idle_proc = 1;
 
while (1) {
void (*idle)(void) = pm_idle;
diff -ruN 2.4.0-test9/arch/ia64/kernel/process.c 
2.4.0-test9-APM/arch/ia64/kernel/process.c
--- 2.4.0-test9/arch/ia64/kernel/process.c  Wed Oct  4 10:36:34 2000
+++ 2.4.0-test9-APM/arch/ia64/kernel/process.c  Mon Oct  9 16:06:23 2000
@@ -121,6 +121,7 @@
init_idle();
current-nice = 20;
current-counter = -100;
+   current-idle_proc = 1;
 
 
while (1) {
diff -ruN 2.4.0-test9/arch/m68k/kernel/process.c 
2.4.0-test9-APM/arch/m68k/kernel/process.c
--- 2.4.0-test9/arch/m68k/kernel/process.c  Wed Oct  4 10:36:48 2000
+++ 2.4.0-test9-APM/arch/m68k/kernel/process.c  Mon Oct  9 16:06:41 2000
@@ -83,6 +83,7 @@
init_idle();
current-nice = 20;
current-counter = -100;
+   current-idle_proc = 1;
idle();
 }
 
diff -ruN 2.4.0-test9/arch/mips/kernel/process.c 
2.4.0-test9-APM/arch/mips/kernel/process.c
--- 2.4.0-test9/arch/mips/kernel/process.c  Wed Oct  4 10:36:48 2000
+++ 2.4.0-test9-APM/arch/mips/kernel/process.c  Mon Oct  9 16:07:14 2000
@@ -36,6 +36,7 @@
/* endless idle loop with no priority at all */
current-nice = 20;
current-counter = -100;
+   current-idle_proc = 1;
init_idle();
 
while (1) {
diff -ruN 2.4.0-test9/arch/mips64/kernel/process.c 
2.4.0-test9-APM/arch/mips64/kernel/process.c
--- 2.4.0-test9/arch/mips64/kernel/process.cWed Oct  4 10:36:48 2000
+++ 2.4.0-test9-APM/arch/mips64/kernel/process.cMon Oct  9 16:07:43 2000
@@ -35,6 +35,7 @@
init_idle();
current-nice = 20;
current-counter = -100;
+   current-idle_proc = 1;
while (1) {
while (!current-need_resched)
if (wait_available)
diff -ruN 2.4.0-test9/arch/mips64/sgi-ip27/ip27-timer.c 
2.4.0-test9-APM/arch/mips64/sgi-ip27/ip27-timer.c
--- 2.4.0-test9/arch/mips64/sgi-ip27/ip27-timer.c   Wed Oct  4 10:37:00 2000
+++ 2.4.0-test9-APM/arch/mips64/sgi-ip27/ip27-timer.c   Mon Oct  9 16:14:10 2000
@@ -110,7 +110,7 @@
do_timer(regs);
 
 #ifdef CONFIG_SMP
-   if (current-pid) {
+   if (!current-idle_proc) {
unsigned int *inc, *inc2;
int user = user_mode(regs);
 
diff -ruN 2.4.0-test9/arch/ppc/kernel/idle.c 2.4.0-test9-APM/arch/ppc/kernel/idle.c
--- 2.4.0-test9/arch/ppc/kernel/idle.c  Wed Oct  4 10:37:00 2000
+++ 2.4.0-test9-APM/arch/ppc/kernel/idle.c  Mon Oct  9 16:08:23 2000
@@ -50,6 +50,7 @@
/* endless loop with no priority at all 

Re: kapmd cpu usage

2000-10-04 Thread Albert D. Cahalan

Rik writes:
> On Wed, 4 Oct 2000, Stephen Rothwell wrote:

>> Seriously, the kapmd is doing the job of yje idle loop.  The
>> processor is almost always asleep, but the time just gets
>> accounted to kapmd.
>
> I have the idea we should really fix this dirty accounting
> thing and properly account kapmd time to idle time.

The easy answer: rename "kapmd" to "IdleTask".
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: kapmd cpu usage

2000-10-04 Thread Rik van Riel

On Wed, 4 Oct 2000, Stephen Rothwell wrote:
> Geoffrey Gallaway <[EMAIL PROTECTED]> writes:
> > in 2.4.0-test9, kampd is taking up between 70% and 80% of cpu usage on my
> 
> Good!
> 
> Seriously, the kapmd is doing the job of yje idle loop.  The
> processor is almost always asleep, but the time just gets
> accounted to kapmd.

I have the idea we should really fix this dirty accounting
thing and properly account kapmd time to idle time.

regards,

Rik
--
"What you're running that piece of shit Gnome?!?!"
   -- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/   http://www.surriel.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: kapmd cpu usage

2000-10-04 Thread Jeff Garzik



On Tue, 3 Oct 2000, Geoffrey Gallaway wrote:

> in 2.4.0-test9, kampd is taking up between 70% and 80% of cpu usage on my
> Celeon 300A box. This is a fresly compiled kernel, Ill list some stats:

That is normal.  kapmd cpu usage == idle time.

Richard, please add this to the FAQ.

Jeff




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: kapmd cpu usage

2000-10-04 Thread Jeff Garzik



On Tue, 3 Oct 2000, Geoffrey Gallaway wrote:

 in 2.4.0-test9, kampd is taking up between 70% and 80% of cpu usage on my
 Celeon 300A box. This is a fresly compiled kernel, Ill list some stats:

That is normal.  kapmd cpu usage == idle time.

Richard, please add this to the FAQ.

Jeff




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: kapmd cpu usage

2000-10-04 Thread Rik van Riel

On Wed, 4 Oct 2000, Stephen Rothwell wrote:
 Geoffrey Gallaway [EMAIL PROTECTED] writes:
  in 2.4.0-test9, kampd is taking up between 70% and 80% of cpu usage on my
 
 Good!
 
 Seriously, the kapmd is doing the job of yje idle loop.  The
 processor is almost always asleep, but the time just gets
 accounted to kapmd.

I have the idea we should really fix this dirty accounting
thing and properly account kapmd time to idle time.

regards,

Rik
--
"What you're running that piece of shit Gnome?!?!"
   -- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/   http://www.surriel.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: kapmd cpu usage

2000-10-04 Thread Albert D. Cahalan

Rik writes:
 On Wed, 4 Oct 2000, Stephen Rothwell wrote:

 Seriously, the kapmd is doing the job of yje idle loop.  The
 processor is almost always asleep, but the time just gets
 accounted to kapmd.

 I have the idea we should really fix this dirty accounting
 thing and properly account kapmd time to idle time.

The easy answer: rename "kapmd" to "IdleTask".
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: kapmd cpu usage

2000-10-03 Thread Geoffrey Gallaway

My apologies to all on the list and Stephen.

I should have thought before I typed. My concern was that this was a
behavior that I had not previously seen in older 2.4.0pre or 2.2.x
kernels...

Once again, my apologies,
Geoff

This one time, at band camp, Stephen Rothwell wrote:

> Hi Geoffrey,
> 
> Geoffrey Gallaway <[EMAIL PROTECTED]> writes:
> > in 2.4.0-test9, kampd is taking up between 70% and 80% of cpu usage on my
> 
> Good!
> 
> Seriously, the kapmd is doing the job of yje idle loop.  The processor
> is almost always asleep, but the time just gets accounted to kapmd.
> 
> Cheers,
> Stephen
> 

-- 
Geoffrey Gallaway || Be wary when walking down the path to madness, all such 
[EMAIL PROTECTED] || paths invariably lead to madness.
D e v o r z h u n ||

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: kapmd cpu usage

2000-10-03 Thread Stephen Rothwell

Hi Geoffrey,

Geoffrey Gallaway <[EMAIL PROTECTED]> writes:
> in 2.4.0-test9, kampd is taking up between 70% and 80% of cpu usage on my

Good!

Seriously, the kapmd is doing the job of yje idle loop.  The processor
is almost always asleep, but the time just gets accounted to kapmd.

Cheers,
Stephen
-- 
Stephen Rothwell, Open Source Researcher, Linuxcare, Inc.
+61-2-62628990 tel, +61-2-62628991 fax 
[EMAIL PROTECTED], http://www.linuxcare.com/ 
Linuxcare. Support for the revolution.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



kapmd cpu usage

2000-10-03 Thread Geoffrey Gallaway

in 2.4.0-test9, kampd is taking up between 70% and 80% of cpu usage on my
Celeon 300A box. This is a fresly compiled kernel, Ill list some stats:

Celeron 300A
Asus Motherboard
64 Megs ram
APM enabled in BIOS
Ne2000 ethernet card
S3 PCI video card

This is based on a redhat 6.2..

Any ideas? I'll be happy to do as much as I can to give whoever needs it
better errors (files in /proc, better description of problem, etc). Just
let me know...

Geoff

-- 
Geoffrey Gallaway || What kills you makes me stronger.
[EMAIL PROTECTED] ||
D e v o r z h u n ||

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



kapmd cpu usage

2000-10-03 Thread Geoffrey Gallaway

in 2.4.0-test9, kampd is taking up between 70% and 80% of cpu usage on my
Celeon 300A box. This is a fresly compiled kernel, Ill list some stats:

Celeron 300A
Asus Motherboard
64 Megs ram
APM enabled in BIOS
Ne2000 ethernet card
S3 PCI video card

This is based on a redhat 6.2..

Any ideas? I'll be happy to do as much as I can to give whoever needs it
better errors (files in /proc, better description of problem, etc). Just
let me know...

Geoff

-- 
Geoffrey Gallaway || What kills you makes me stronger.
[EMAIL PROTECTED] ||
D e v o r z h u n ||

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: kapmd cpu usage

2000-10-03 Thread Stephen Rothwell

Hi Geoffrey,

Geoffrey Gallaway [EMAIL PROTECTED] writes:
 in 2.4.0-test9, kampd is taking up between 70% and 80% of cpu usage on my

Good!

Seriously, the kapmd is doing the job of yje idle loop.  The processor
is almost always asleep, but the time just gets accounted to kapmd.

Cheers,
Stephen
-- 
Stephen Rothwell, Open Source Researcher, Linuxcare, Inc.
+61-2-62628990 tel, +61-2-62628991 fax 
[EMAIL PROTECTED], http://www.linuxcare.com/ 
Linuxcare. Support for the revolution.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: kapmd cpu usage

2000-10-03 Thread Geoffrey Gallaway

My apologies to all on the list and Stephen.

I should have thought before I typed. My concern was that this was a
behavior that I had not previously seen in older 2.4.0pre or 2.2.x
kernels...

Once again, my apologies,
Geoff

This one time, at band camp, Stephen Rothwell wrote:

 Hi Geoffrey,
 
 Geoffrey Gallaway [EMAIL PROTECTED] writes:
  in 2.4.0-test9, kampd is taking up between 70% and 80% of cpu usage on my
 
 Good!
 
 Seriously, the kapmd is doing the job of yje idle loop.  The processor
 is almost always asleep, but the time just gets accounted to kapmd.
 
 Cheers,
 Stephen
 

-- 
Geoffrey Gallaway || Be wary when walking down the path to madness, all such 
[EMAIL PROTECTED] || paths invariably lead to madness.
D e v o r z h u n ||

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/