Re: [PATCH] New APM patch for testing

Stephen.Rothwell@canb.auug.org.au
Mon, 21 Jun 1999 01:41:49 +1000


Hi Trever,

Trever Adams <trever_Adams@bigfoot.com> writes:
> > - Remove CONFIG_APM_POWER_OFF and make it boot time
> > configurable (default on).
> > - Make debug only a boot time parameter (remove APM_DEBUG).
>
> If these were each only 100 bytes of memory (unlikely), my answer would
> be "what are you smoking?" I am no kernel hacker (though I am going to
> try to cut my teeth here shortly), but no, I really don't think so. If
> I don't want APM debugging functionality, I don't want ifs taking up
> kernel time, I don't want code taking up ram... I JUST DON'T WANT IT.
>
> This is not Windows land where you make things "run time configurable."
> You make them clean; you make the cut and dry! Like I said, if they
> were 200 bytes of memory TOTAL and didn't clutter the common path,
> fine... but I don't think you can claim this.

[First up, let me say that your tone offends me a little, but I
have taken a while to breath calmly, so I will actually answer you.
I have learned from dealing with my small children :-)]

OK, lets see ... the power off changes add 1 variable (4 bytes), and
the passing of 1 integer in two places in the kernel (8 bytes), and add
two tests. One of these is in the code that is executed when you are
trying to power off your machine and the other is in the initialisation
code that is discarded after the kernel is initialised. Total 12 bytes
in the running kernel and 1 test that is hardly in the "common path"!

The debug change does actually add about 140 bytes af data to the
kernel. It also adds 1 test to the code. This test is in the
routine that gets events from the BIOS and believe me, calling the
BIOS swamps anything we do! What do we gain? Well when people
report problems, I used to have to say "Please edit apm.c and define
APM_DEBUG and then rebuild the kernel and then reproduce the problem
and tell me what you get in your logs" now I can say "reboot and
pass apm=debug to the kernel and ...". Can you see how I can
justify this?

If you have ANY problems of substance, please let us know ...

Cheers,
Stephen

--
Stephen Rothwell                    Stephen.Rothwell@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/