To read all comments associated with this story, please click here.
- 1991 Linux kernel started
- 1996 (5 years later) "Big kernel lock" added as a quick hack to get it working on SMP systems
- 2011 (15 years later) "Big kernel lock" finally removed completely
This leaves out what went wrong. Where more and more code end up protected by the BKL even if it really did not require it.
Rewrite from scratch for SMP still could have ended up a huge mess. Core developers today are a lot wiser than the were even 5 years ago.
And the change in wisdom will start showing itself.
Interesting theory.
Of course, it's impossible to tell if what you claim is actually true, because in the 1996-2011 period a lot happened besides removing BKL.
It would have ended up like KDE4, Linux was in early adoption stage back then. If they added a massive amount of regressions only to be able to evolve faster a few years later, Linux would have died. It was not yet strong enough to survive that.
*I love KDE4, but don't deny the early problem it had.
Some interesting stats:
- 1991 Linux kernel started
- 1996 (5 years later) "Big kernel lock" added as a quick hack to get it working on SMP systems
- 2011 (15 years later) "Big kernel lock" finally removed completely
It would've been quicker to rewrite it from scratch in 1996, instead of attempting to retro-fit SMP support on a kernel that wasn't originally designed for it; especially when you consider that the number of contributors would've been far less in the earlier years.
- Brendan
Just 8 years longer than what transpired on FreeBSD.
For those who don't know or remember how the SMP improvements in FreeBSD came about, Greg Lehey's talk from 2003 is worth reading.
http://www.lemis.com/grog/SMPng/Singapore/slides.pdf
While many of us (myself included) view free vs commercial as a contest, they do benefit from one another.
I would argue that if they had done what you suggest in 1996, Linux would be nothing but a memory now of something that might have been. Seriously - that would have killed all forward progress on the kernel for at least a year or more.
Trying to go straight from a non-preemptive unicore kernel directly to a preemptive one with fine-grained locking would have been a disaster imo. That is something you want to do slowly and carefully. Even with the BKL "hack" Linux scaled well enough on dual processor hardware, which was what most people were running and was enough to get it by for a while (obviously).
Sure, it wasn't competitive with Solaris and such on big hardware for a long time - but most people didn't care because they were not running Linux on such hardware... No, it wasn't ideal - but reality often requires one to compromise their ideals in the name of getting things done. As Linus is fond of saying, "perfect is the enemy of good".
I'm just happy the people managing the project knew better and didn't try to bite off more than they could chew...
ps. You left out that they started the process of removing the BKL about 6 or 7 years ago. It wasn't done overnight, and about 75% of the scalability gains in doing so have been realized for at least 5 years.
Edited 2011-05-22 07:06 UTC
They could have done it with a separate release like FreeBSD did - 4.x for stability, 5.x for new SMP.
That might also have allowed Linux to get the TTY layer rewrite in years earlier (is that even complete as yet?)
and we might still have Alan Cox maintaining it, who's probably been more important to the improvements in Linux than any single person incl Torvalds himself.





Member since:
2005-11-16
Hi,
Some interesting stats:
- 1991 Linux kernel started
- 1996 (5 years later) "Big kernel lock" added as a quick hack to get it working on SMP systems
- 2011 (15 years later) "Big kernel lock" finally removed completely
It would've been quicker to rewrite it from scratch in 1996, instead of attempting to retro-fit SMP support on a kernel that wasn't originally designed for it; especially when you consider that the number of contributors would've been far less in the earlier years.
- Brendan