What’s New in Linux 2.6.39: Ding Dong, the Big Kernel Lock is Dead

486

Linus Torvalds has released the 2.6.39 kernel. This release brings new features, new drivers, and one big accomplishment: Ridding the Linux kernel of the Big Kernel Lock.

The Big Kernel Lock was almost removed in the 2.6.37 kernel. That is, the kernel could be built without it — but some of the code was still there.

With the 2.6.39 kernel, the BKL is finally gone with a patch from Arnd Bergmann. This has been a long-running saga, and LWN has some good coverage of what the BKL is (or was) and the effort to get rid of it. Why the effort to get rid of it? The short answer is that the BKL was behind some performance issues and latencies that you really don’t want.

But what else is in the new kernel? Plenty.

Improvements and New Features

One thing you’ll find in any new kernel is support for new hardware, and 2.6.39 doesn’t disappoint. As LWN details, you get support for lots of laptop special keys (Dell’s All-in-One series, for example) and a number of hardware controllers from Texas Instruments and ST-Ericsson. Lots of devices under Video4Linux as well.

This release also provides support for some USB 3.0 hubs — which means that Linux users should be enjoying USB 3.0 devices in the not-too-distant future.

Naturally, the kernel also includes a number of improvements to existing drivers and features. A biggie for many users will be the driver for Intel’s GMA500, a graphics device in many netbooks that has been a bit of a problem for Linux users. You’ll also find improvements in Nouveau for Nvidia chipsets, and support for AMD’s Cayman video cards and chipsets.

But it’s not all just about hardware. The 2.6.39 kernel marks the introduction of user namespaces, which provide more fine-grained control over privileges that a process can have. Namespaces provide “containers” for processes that keeps them walled off from the rest of the system (which can protect the process and/or the system). User namespaces allow unprivileged users to create a namespace, rather than having the namespace created by the system administrator.

This release also adds support for IP sets to the Linux kernel. IP sets aren’t entirely new, but they weren’t part of the mainline kernel previously. What is ipset? Basically, it allows creation of iptables rules that deal with a set (hence the name) of ports or IP addresses without having to have a rule for each address or port. Just using iptables, for example, you’d create a rule to block or reject packets from a single address or network — but using ipsets you could generate a rule that looks at an ipset table and deals with all the ports or addresses appropriately. (Look for a Linux.com tutorial on ipsets soon.)

Another interesting feature in 2.6.39 is the pstore filesystem, which creates a filesystem for platform-specific storage. This might be used to store a small amount of data when a system crashes, for examination later. Or it might be used to store other data across reboots. We’ll see where they go with that — it could be very interesting.

Mo’ Drivers, Mo’ Problems…

It’s worth noting that kernel development is not always flawless. In this case, there are some regressions in the Sandy Bridge code.

This is not great, but it’s also not the end of the world. Why? Very few users get their kernel directly from kernel.org — it’s not as if the minute that the kernel is released it gets pushed to every user. Some kernels aren’t widely used at all. Other kernels tend to be used by several major distributions and get widespread usage — as well as continued attention and support from the kernel folks. See our piece on understanding the stable Linux kernel for more on that.

So, the new kernel has a few bugs to work out. They’ll be worked out in short order, and the vast majority of users are unlikely to ever notice.

Merge Window is Open!

With the 2.6.39 kernel out, the merge window for the next kernel is now open. What’s the merge window, some of you may wonder? After each kernel is released, there’s a period of time (two weeks) that lots of patches are put in for the next version — in other words, this is the time when new features, big fixes, and so on are put into the kernel for the developers to work on. The rest of the kernel development cycle is testing and fixing bugs and regressions that creep in due to the patches that are merged.

The merge window for the next kernel (2.6.40) may be shorter than the usual 14 days. Torvalds will be attending LinuxCon Japan and he warns “if I get the feeling that I’ve merged ‘enough’, I might just make it easier for myself and cut it two days short and release before I leave on Memorial Day (which for the non-US based of you is May 30th this year).”

What’s expected in 2.6.40? It’s always hard to say with certainty, but it may be a small release, comparatively. Expect work towards cleaning up the ARM-related code in the Linux kernel for sure. LWN has an excellent piece on rationalizing the ARM tree for those who are interested in the nitty gritty details of kernel development.

There’s also talk of Nvidia Optimus support coming in 2.6.40. If you’re not a hardware geek that translates loosely into support for hybrid graphics for laptops that offer two Graphics Processing Units (GPUs) — in this case an Nvidia and Intel graphics card. This is useful for machines that you want to save power when on the road, but have a (more) powerful video card when the laptop is plugged in. There’s much more to it, of course, than just switching between video output — and making it seamless (without requiring an X restart, for example) takes quite a bit of work.

There’s plenty more on the way as well, and we’ll have an update when 2.6.40 is released. If recent releases are any indication, the 2.6.40 release should be available in late July or early August.