[Haifux] No! No! Don't compile your kernel!

Shlomi Fish shlomif at iglu.org.il
Mon Jan 24 12:41:52 MSK 2011


On Sunday 23 Jan 2011 23:06:40 Nadav Har'El wrote:
> On Sun, Jan 23, 2011, Eli Billauer wrote about "[Haifux] No! No! Don't 
compile your kernel!":
> > Yet another sign that Linux is turning into a don't-touch-me kind of
> > system. How many times did they tell me I don't really want to compile
> > my kernel?
> > http://wiki.centos.org/HowTos/Custom_Kernel
> 
> When was the last time you compiled gcc on your own? 

I compiled it shortly after I read this article - 
http://lwn.net/Articles/387122/ in May 2010, and wanted to see how the new 
flags affect the speed of Freecell Solver, and it indeed benefited from them. 
The process was not hard and here's my script for it:

[code]
#!/bin/bash
~/Download/unpack/prog/gcc/gcc-4.5.0/configure \
    --prefix="$HOME"/apps/prog/gcc-4.5.0 \
    --enable-languages="c,c++"
[/code]

(You need to build it in a different directory than the source.).

Previously, in April 2009, I built gcc-2.95.3 (which is very old) to see how 
much faster it *compiles*, and how much slower the resultant executables are:

http://tech.groups.yahoo.com/group/fc-solve-discuss/message/940

> When was the last time
> you compiled the X Window System? 

It's been a while since I compiled the entire X Window System since it became 
modular, but I've built the x11-server on occasions for Mandriva. Though I 
used the .src.rpm.

> For me, the answers to both questions is
> 1995. If you answered similarly (or even, "never"), why should the kernel
> be any different - i.e., why do you need to compile a kernel unless you're
> a kernel developer (and 99.9% of Linux users aren't)?

Well, I've also built some kernels for ocassions. The vanilla 2.6.37 kernel I 
built seemed snappier than the shipped-in Mandriva kernel, and it Freecell 
Solver executed there at 72.7685720920563s instead of 73.6936609745026s (the 
fractions are what was reported by my script and copy pasted here - they are 
not very accurate.).

> 
> Before Linux had modules, you often needed to recompile the kernel to add
> new hardware. With the advent of kernel modules (in Linux 1.2 in 1995...),
> this is no longer the case. So really, why *would* you want to recompile
> the kernel, unless you are a kernel developer, i.e., modifying the kernel?

Possibly to gain some speed or responsiveness or reduce memory consumption. 
Also, there are source-based distributions (e.g: Gentoo) which compile the 
source on each upgrade.

Regards,

	Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Why I Love Perl - http://shlom.in/joy-of-perl

Chuck Norris can make the statement "This statement is false" a true one.

Please reply to list if it's a mailing list post - http://shlom.in/reply .



More information about the Haifux mailing list