2001-03-03 23:04:30

by Francis Galiegue

[permalink] [raw]
Subject: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time

As attachment. Don't ask me why it works. Rather, if you see why it works, I'd
like to know why :)

Patch also applies cleanly over 2.4.2-ac10.

--
Francis Galiegue, [email protected] - Normand et fier de l'?tre
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race" -- R. Cook


Attachments:
linux-2.4-fix-kapm.patch (348.00 B)

2001-03-03 23:13:21

by Alan

[permalink] [raw]
Subject: Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time

> As attachment. Don't ask me why it works. Rather, if you see why it works, I'd
> like to know why :)

Why are you breaking kapm-idled. It is supposed to take all that cpu time. You
just broke all the power saving

2001-03-03 23:15:31

by Francis Galiegue

[permalink] [raw]
Subject: Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time

On Sun, 4 Mar 2001, Francis Galiegue wrote:

>
> As attachment. Don't ask me why it works. Rather, if you see why it works, I'd
> like to know why :)
>

BTW, in case this matters, this is with gcc 2.95.3 compiler...

--
Francis Galiegue, [email protected] - Normand et fier de l'?tre
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race" -- R. Cook

2001-03-03 23:20:01

by Francis Galiegue

[permalink] [raw]
Subject: Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time

On Sat, 3 Mar 2001, Alan Cox wrote:

>
> > As attachment. Don't ask me why it works. Rather, if you see why it works, I'd
> > like to know why :)
>
> Why are you breaking kapm-idled. It is supposed to take all that cpu time. You
> just broke all the power saving
>

Well, from reading the source, I don't see how this can break APM... What am I
missing?

--
Francis Galiegue, [email protected] - Normand et fier de l'?tre
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race" -- R. Cook

2001-03-03 23:28:53

by Philipp Rumpf

[permalink] [raw]
Subject: Re: [kernel] Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time

On Sun, Mar 04, 2001 at 12:19:07AM +0100, Francis Galiegue wrote:
> Well, from reading the source, I don't see how this can break APM... What am I
> missing?

apm_bios_call must not be called with two identical pointers for
two different registers.

2001-03-03 23:33:03

by Alan

[permalink] [raw]
Subject: Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU

> Well, from reading the source, I don't see how this can break APM... What=
> am I
> missing?

If you've stopped kapm-idled from using cpu then you've stopped it from going
into the bios suspend one presumes.

2001-03-04 00:03:02

by Francis Galiegue

[permalink] [raw]
Subject: Re: [kernel] Re: [PATCH] 2.4.2: cure the kapm-idled taking (100-epsilon)% CPU time

On Sat, 3 Mar 2001, Philipp Rumpf wrote:

> > Well, from reading the source, I don't see how this can break APM... What am I
> > missing?
>
> apm_bios_call must not be called with two identical pointers for
> two different registers.
>

OK, my bad... By replacing the call I made with this:

u32 dummy, a, b, c, d;

if (apm_bios_call(APM_FUNC_IDLE, 0, 0, &dummy, &a, &b, &c, &d))
return 0;

then the situation is back to "normal"...

Just one more thing though: in apm_bios_call_simple():

[...]
APM_DO_SAVE_SEGS;
{
int cx, dx, si;
[...]

Aren't cx, dx and si really meant to be u32?

--
Francis Galiegue, [email protected] - Normand et fier de l'?tre
"Programming is a race between programmers, who try and make more and more
idiot-proof software, and universe, which produces more and more remarkable
idiots. Until now, universe leads the race" -- R. Cook