Mailing List archive

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

[linux-dvb] Re: refactoring



Andrew de Quincey wrote:

On Wednesday 06 Oct 2004 15:50, Holger Waechtler wrote:

Andrew de Quincey wrote:

Yeah, was pondering on whether you was arguing with me or against me :)
The #ifdef bloat won't be that much of a problem will it? The code in
question will just be a function with a #ifdef block for each frontend?
If there is only one frontend supported by an adapter, I can see no harm
in 'select'ing it though.

Hi, I've just been implementing this. There is a problem with doing it
using "default".

If a user enables one DVB card, saves the config, and compiles the kernel,
everything will be fine. However, if they then enable another DVB card
requiring a different frontend, things will go wrong. The reason is that
default does not work if a value has already been set for a kernel
option... so when the first card was selected, all non-essential
frontends will be marked as "not selected". Default will not turn them on
again for the second card.

I'd rather avoid this confusion completely - most users won't care that
three frontend modules are being loaded when only one is really
necessary. What I'm going to do is turn on all frontends by default. Only
the relevant ones will actually get loaded by the cards however, so we
end up in the same situation as before.

Obviously if the user manually turns one off, they can be assumed to be
knowing what they're doing, and can sort out any problems themselves.

sounds good so far. What about adding them directly to the obj-$()-list
in the Makefile of the drivers? Since the code of most drivers is far
less than a memory page many drivers would not increase in codesize at
all (the demod code would just fill up the free space in the last page
of the driver) when the demod code gets linked directly into the card
driver module...

Here are the sizes of the frontends:
Module Size Used by
ves1820 7428 0
tda80xx 9216 0
cx22702 6912 0
mt352 6788 0
nxt6000 7680 0
sp887x 8452 0
tda1004x 12932 0
ves1x93 7296 0
mt312 9220 0
dib3000mb 17156 0
l64781 8452 0
tda8083 7044 0
cx24110 8708 0
cx22700 6532 0
sp8870 8708 0
stv0299 12164 0
at76c651 6660 0

Compiled on debian woody with GCC 2.94.5

The av7110 has the most requirements: ves1820, ves1x93, stv0299, tda8083, sp8870

Please see my mail from two days ago for a detailed analysis with objdump on the example of the cx27000/alps_tdmb7 driver, only about 1kByte from 6kB are actually code. Pathological examples like the stv0299 are harder to analyze, here a big part of the code are probing and if(tuner_type=XXX) {} handlers.

Holger





Home | Main Index | Thread Index