tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Parent "device" selection in kernel configuration



On Sat, 22 Sep 2012, Bexley Hall wrote:

> Hopefully the correct list for this question...
>
> I'm looking for some guidance in deciding criteria that
> affect your (i.e., *my*) decision as to which of (for
> example):
>     lpt* at acpi?
>     lpt* at isa?
>     lpt* at pnpbios?
> to use in a particular (5.1.2/i386, in this case) kernel
> config (and, of course, any other drivers that have a
> "choice" of where they "attach" in the kernel config).
>
> Said differently, if *all* of these will work on a given
> box, how should one go about choosing *which* to rely
> upon?
>
> Are there performance differences between them?
> Kernel size differences?
> Boot time impact?
>
> I.e., how does the code change (if at all)?

Usually, there is not much difference.

The lpt driver is actually implemented in src/sys/dev/ic/lpt.c; the
attachment wrappers are found in eg src/sys/dev/acpi/lpt_acpi.c,
src/sys/dev/isa/lpt_isa.c and src/sys/arch/i386/pnpbios/lpt_pnpbios.c.. if
you examine the code, the wrappers only discover and map the IO port and
IRQ used by the appropriate method, then call lpt_attach_subr() to hand
over the information to the lpt driver itself.

If you decided that all of your hardware could be found adequately through
isa drivers and decided that you didn't care about ACPI for instance, then
you could compile the kernel without it.. and it would end up smaller of
course, but I doubt it would boot measurably faster. And, since the code
is unused then it will not really affect performance.

However, with modern x86 hardware (I have a ~6yr old laptop with 1GB RAM
which is not in any way notable) I doubt that trimming my kernel down in
this way from its current 13MB would make any significant difference, so I
don't bother any longer. If you are working with more limited hardware
though, it might be worth your time..

regards,
iain


Home | Main Index | Thread Index | Old Index