Re: Kernel v2.3.x

Richard Gooch (Richard.Gooch@atnf.CSIRO.AU)
Wed, 22 Jul 1998 16:44:52 +1000


Alex Buell writes:
> I've been thinking about the 2.3.x development, I have some suggestions
> that might help make the code tree more manageable.
>
> How about splitting the kernel tree into separate .tar.gz files like so:
>
> 1) Linux-Core-2.3.x.tar.gz - contains the 100% portable core of kernel
> 2) Linux-Arch-<cpu>-2.3.x.tar.gz - contains the architecture specifics
> i.e Linux-Arch-ia32-2.3.x,
> Linux-Arch-ia64-2.3.x,
> Linux-Arch-mips-2.3.x ... and so forth.
> 3) Linux-Drivers-<cpu>-2.3.x - contains the drivers for that architecture
> ie. Linux-Drivers-ia32... you get the idea.
>
> The idea behind this is to make it easier for people to download just the
> components they want for their particular architecture, instead of
> downloading everything as at present for the 2.1.x tree. Then they either
> untar themselves or use a script to "plug" the sources into a complete
> Linux tree, and configure using what someone proposed (a database config?)
> earlier this year. It'd certainly reduce the size of the files people have
> to download, and even make it easier to cross compile kernels.
>
> Any comments?

OK. Since we've seen this many times before, I've written something
for the FAQ to answer this. A sneak preview follows:

The Kernel sources are HUUUUUGE! Why don't we split it?
====
OK, let's take a look at this. The kernel (as of 2.1.110) has about
1.5 million lines of code in *.c, *.h and *.S files. Of those, about
253 k lines (17%) are in the architecture-specific subdirectories, and
about 815 k lines (54%) are in platform-independent drivers. If, like
most people, you are only interested in i386, you could save about 230
k lines by removing the other architecture-specific trees. That is a
15% saving, which is not that much, really. The "core" kernel and
filesystems takes up about 433 k lines, or around 29%.
<p>
If you want to start throwing drivers away, the problem becomes much
harder, since most of that code is architecture independent. Or at
least, is supposed to be/will be. There is some code there which
probably should be moved to an i386-specific subdirectory, and perhaps
over time it will be (but it will take a lot of work!), but you need
to be careful. PCI cards for example should be architecture
independent. Throwing out the non i386-specific drivers will save
around 97 k lines, a saving of about 6%.
<p>
But the most import argument against splitting the kernel sources is
not about how much space you could save. It's about the work involved
for Linus. He is already overworked, and doesn't need the added burden
of splitting patches according to different "feature sets". He already
provides tarballs (compressed tarfiles) of the whole kernel as a
public service (his preference is to just release patches). Asking for
anything more will just get you silently ignored by him.
<p>
If you are really desperate for a reduced kernel, set up some
automated procedure yourself, which takes the patches Linus makes
available, apply them to a base tree and then tar up the tree into
multiple components. Once you've done all this, make it available to
the world as a public service. There will be others who will
appreciate your efforts.

Regards,

Richard....

-
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.altern.org/andrebalsa/doc/lkml-faq.html