Re: [PATCH] preset loops_per_jiffy for faster booting

From: Andrew Morton
Date: Sat Jul 10 2004 - 20:27:55 EST


"Adam Kropelin" <akropel1@xxxxxxxxxxxxxxxx> wrote:
>
> > Does 250 ms worth all this pain?
>
> On a desktop box, almost certainly not. On a massive SMP machine, maybe. On
> an embedded system that is required to boot in a ridiculously short time,
> absolutely.

Yes, it's pretty small beer, but we do recognise that although the number
of development teams which use features like this is small, the number of
systems is large, so the features are correspondingly more important.

One of the services which we kernel developers provide the downstream
kernel users is the hosting and maintenance of their code so they don't
have to carry important stuff off-stream, and when the changes are this
small and simple, I don't see a problem with merging them, even if none of
"us" will use the feature.

wrt this particular patch:

a) I don't see much point in making it configurable. Just add the boot
option and be done with it. The few hundred bytes of extra code will be
dropped from core anyway.

The main reason for this is that most people won't turn on the config
option, so your new code could get accidentally broken quite easily.
Plus it removes some ifdefs.

b) Coding style consistency, please:

Replace things like

/* Do a binary approximation to get loops_per_jiffy set to
equal one clock (up to lps_precision bits) */

with

/*
* Do a binary approximation to get loops_per_jiffy set to
* equal one clock (up to lps_precision bits)
*/


while ( lps_precision-- && (loopbit >>= 1) ) {

should be

while (lps_precision-- && (loopbit >>= 1)) {

Yes, some of the code was already like that, but let's regularise these
things as we go.

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