Long time no write…. My last diary entry was almost
one year ago!

Playing with LILO and Slashdot

This morning, I loaded the Slashdot home page
and… Oops! What’s there in the story at the top of the
page? Three links to my LILO pages. Ouch! This is going
to hurt… Welcome to the Slashdot effect! Quick look at
the logs of the web server: since this morning, the server
has already seen more than 20,000 visitors making more than
300,000 requests. And many people in the US are still in
bed at this time. All these downloads are going to suck a
significant amount of bandwidth…

Playing with LILO is fun. It is also
interesting because it encourages good programming
practices. Testing a modified boot screen requires a reboot
of the PC, and any fatal error in the program is likely to
prevent the computer from booting at all. So I take the
time to re-read my code before rebooting. This reminds me
of the good old time when I was programming in Z80 assembler
on my ZX Spectrum.

Playing with the Linux kernel

Yesterday, I had to run some tests at work with
a modified version of the Linux TCP stack. The goal was to
change the initial size of the congestion window and to run
some performance tests on a dedicated network (with high
bandwidth*delay product). Of course, there is no
/proc interface for changing that, because this
would violate the standards. So I decided to add my own. I
had never looked closely at the Linux kernel code before,
and I never touched the TCP stack.

It took me a while to find the file that I had
to
change, but find, grep and emacs
are very useful tools. Once I found the file
(net/ipv4/tcp_input.c), it was really easy to
change the way the cwnd was initialized. Half an
hour later, I had created two new interfaces in
/proc/sys/net/ipv4 and everything was working. I
even added a new option in net/ipv4/Config.in to
make these features optional. By reading or writing to the
pseudo-files in /proc, I could dynamically alter
the behavior of the TCP stack and make it
standards-compliant or not.

This was a very interesting experience for me,
because I have been working on free software for a long
time, but still I did not expect that it would be so easy to
add a new feature to something as complex as the TCP stack
of Linux. Of course, I only had to do a very small change
that was limited to a few files, but it was interesting for
me to see how easy it was to understand how the
/proc interfaces work and how the kernel
configuration works, considering that it was the very first
time that I looked at it. So I have to congratulate the
kernel hackers for all this nice work.

Attribution-ShareAlike 3.0
This work is licensed under a Attribution-ShareAlike 3.0.