LWN.net Logo

SCALE 8x: Ubuntu kernel development process

By Jake Edge
March 3, 2010

Canonical's kernel manager, Pete Graner, spoke at UbuCon—held just prior to SCALE 8x—on the "Ubuntu Kernel Development Process". In the talk, he looked at how Ubuntu decides what goes into the kernel and how that kernel gets built and tested. It provided an interesting look inside the process that results in a new kernel getting released for each new Ubuntu version, which comes along every six months.

Graner manages a "pretty big" group at Canonical, of 25 people split into two sub-groups, one focused on the kernel itself and the other on drivers. For each release, the kernel team chooses a "kernel release lead" (KRL) who is responsible for ensuring that the kernel is ready for the release and its users. The KRL rotates among team members with Andy Whitcroft handling Lucid Lynx (10.04) and Leann Ogasawara slated as KRL for the following ("M" or 10.10) release.

The six-month development cycle is "very challenging", Graner said. The team needs to be very careful about which drivers—in-tree, out-of-tree, and staging—are enabled. The team regularly takes some drivers from the staging tree, and fixes them up a bit, before enabling them in the Ubuntu tree so that users "get better hardware coverage".

Once the kernel for a release has been frozen, a new branch is created for the next release. For example, the Lucid kernel will be frozen in a few weeks, at which point a branch will be made for the 10.10 release. That branch will get the latest "bleeding edge" kernel from Linus Torvalds's tree (presumably 2.6.34-rc1), and the team will start putting the additional patches onto that branch.

The patches that are rolled into the tree include things from linux-next (e.g. suspend/resume fixes), any patches that Debian has added to its kernel, then the Ubuntu-specific patchset. Any of those that have been merged into the mainline can be dropped from the list, but it is a "very time-consuming effort" to go through the git tree to figure all of that out. With each new tag from Torvalds's tree, they do a git rebase on their tree—as it is not a shared development tree—"see what conflicts, and deal with those".

The focus and direction for the Ubuntu kernel, like all Ubuntu features, comes out of the Ubuntu Developer Summit (UDS), which is held shortly after each release to set goals and make plans for the following release. Before UDS, the kernel team selects some broad topics and creates blueprints on the wiki to describe those topics. In the past, they have focused on things like suspend/resume, WiFi networking, and audio; "a big one going forward is power management", he said.

The specifications for these features are "broad-brush high-level" descriptions (e.g. John has a laptop and wants to get 10 hours of battery life). The descriptions are fleshed out into various use cases, which results in a plan of action. All of the discussion, decisions, plans, and so on are captured on the UDS wiki

One of the longer kernel sessions at UDS looks at each kernel configuration option (i.e. the kernel .config file) to determine which should be enabled. New options are looked at closely to decide whether that feature is needed, but the existing choices are scrutinized as well.

In addition, Graner said that the team looks at the patches and drivers that were added to the last kernel to see which of those should be continued in the next release. He pointed to Aufs as a problematic feature because it always breaks with each new kernel release and can take up to three weeks to get it working. They have talked about dropping it, because Torvalds won't merge it into the mainline, but the live CDs need it.

The kernel team has to balance the Ubuntu community needs as well as Canonical's business needs, for things like Ubuntu One for example, and come up with a set of kernel features that will satisfy both. The discussions about what will get in at UDS can get intense at times, Graner said, "Lucid was pretty tame, but Karmic was kind of heated".

Lucid will ship with the 2.6.32 kernel which makes sense for a long-term support (LTS) release. 2.6.32 will be supported as a stable tree release for the next several years and will be shipped with the next RHEL and SLES. That means it will get better testing coverage which will lead to a "very stable kernel for Lucid".

Each stable tree update will be pulled into the Ubuntu kernel tree, but LTS updates to the kernel will only be pushed out quarterly unless there is a "high" or "medium" security fix. For new kernel feature development, new mainline kernel releases and release candidates are pulled in by the team as well. Graner gave two examples of new development that is going on in the Ubuntu kernel trees: adding devicetree support for the ARM architecture, which will reduce the complexity of supporting multiple ARM kernels, and the AppArmor security module that is being targeted for the 2.6.34 kernel.

Once the kernel version has been frozen for a release, the management of that kernel is much more strictly controlled. The only patches that get applied are those that have a bug associated with them. Stable kernel patches are "cherry-picked" based on user or security problems. There is a full-time kernel bug triager that tries to determine if a bug reporter has included enough information to have any hope of finding the problem—otherwise it gets dropped. One way to ensure a bug gets fixed, though, is to "show the upstream patch that fixes the problem"; if that happens, it will get pulled into the kernel, Graner said.

There are general freezes for each alpha, beta, and the final release, but the kernel must already be in the archive by the time of those freezes. Each time the kernel itself freezes, it "takes almost a full week to build all of the architectures" that are supported by Ubuntu. There are more architectures supported by Ubuntu than any other distribution "that I am aware of", he said. Each build is done in a virtualized environment with a specific toolchain that can be recreated whenever an update needs to be built. All of that means the kernel needs to freeze well in advance of the general release freeze, typically about a month before.

Once the kernel is ready, it is tested in Montreal in a lab with 500 or 600 machines. The QA team runs the kernels against all that hardware, which is also a time-consuming process. Previously, the kernels would be tossed over the wall for users to test, but "now Canonical is trying to do better" by dedicating more resources to testing and QA.

Managing kernel releases for a distribution is big task, and the details of that process are not generally very well-known. Graner's talk helped to change that, which should allow others to become more involved in the process. Understanding how it all works will help those outside of the team do a better job of working with the team, which should result in better kernels for Ubuntu users.


(Log in to post comments)

SCALE 8x: Ubuntu kernel development process

Posted Mar 4, 2010 7:37 UTC (Thu) by viiru (subscriber, #53129) [Link]

"There are more architectures supported by Ubuntu than any other distribution "that I am aware of", he said"

What the hell is the guy babbling on about? As far as I can tell Ubuntu has official support for three architectures and three unofficial ports for it's latest release. That would appear to make six (see https://help.ubuntu.com/9.10/installation-guide/i386/hard...). Debian supported 11 for the latest release, and I'm pretty sure that the people at Canonical have heard about Debian...

SCALE 8x: Ubuntu kernel development process

Posted Mar 4, 2010 14:42 UTC (Thu) by nye (guest, #51576) [Link]

Yeah, that does sound suspect. Although I'm not sure I'd trust that page to be properly maintained. Talking about Ubuntu 9.10 (Karmic):

"However, Debian GNU/Linux jaunty will not run on 386 or earlier processors."

Hmm...

SCALE 8x: Ubuntu kernel development process

Posted Mar 4, 2010 16:54 UTC (Thu) by nix (subscriber, #2304) [Link]

And Ubuntu *will* run on 386s? Interesting, 'cos G++ compiles atomic instructions into C++ programs which are only valid on 486 and above. These aren't in some shared library, they're *compiled into the programs themselves* thus in effect are part of the ABI. Does Ubuntu have its own C++ ABI? I doubt it.

SCALE 8x: Ubuntu kernel development process

Posted Mar 4, 2010 17:17 UTC (Thu) by nye (guest, #51576) [Link]

Not sure if you're joking or not, but obviously they've done a search and replace from a Debian document at some point for Jaunty, and then copy/pasted the same thing into the Karmic page.

SCALE 8x: Ubuntu kernel development process

Posted Mar 5, 2010 0:16 UTC (Fri) by nix (subscriber, #2304) [Link]

That's what I thought: last I knew, Ubuntu required i686, but, hey, maybe
they just increased their hardware support in the old-machine direction
vastly. (Very unlikely, I know!)

SCALE 8x: Ubuntu kernel development process

Posted Mar 11, 2010 19:19 UTC (Thu) by sciurus (subscriber, #58832) [Link]

My best guess is that Canonical test lots of different ARM boards and he's
counting each of them as an architecture.

SCALE 8x: Ubuntu kernel development process

Posted Mar 4, 2010 15:22 UTC (Thu) by herodiade (subscriber, #52755) [Link]

> 2.6.32 will be supported as a stable tree release for the next several years and will be shipped with the next RHEL and SLES.

... and probably the next Debian.

I've seen rumors/predictions (based on a leaked internal build name) for RHEL6-may-run-2.6.32; but this seems weak. Do you have more information about that?

That's the first time I've heard about the next SLES using 2.6.32 though. Is this a transcription of something Graned said, an LWN exclusive scoop, or something already known?

SCALE 8x: Ubuntu kernel development process

Posted Mar 4, 2010 15:38 UTC (Thu) by jake (editor, #205) [Link]

> That's the first time I've heard about the next SLES using 2.6.32 though.
> Is this a transcription of something Graned said, an LWN exclusive scoop,
> or something already known?

I thought it was reasonably well-known, but could easily be mistaken. It *is* what Pete said, though. (He mentioned both RHEL and SLES).

jake

SCALE 8x: Ubuntu kernel development process

Posted Mar 4, 2010 18:36 UTC (Thu) by BenHutchings (subscriber, #37955) [Link]

Pete must be confused. SLES 11 is only a year old so SLES 12 isn't due for some time. openSUSE has already moved on to 2.6.33.

SCALE 8x: Ubuntu kernel development process

Posted Mar 4, 2010 20:03 UTC (Thu) by jengelh (subscriber, #33263) [Link]

And iff there was a new SLES branch right now, I am pretty sure it would use one of the openSUSE kernels - i.e. 2.6.31.

SCALE 8x: Ubuntu kernel development process

Posted Mar 6, 2010 3:59 UTC (Sat) by smoogen (subscriber, #97) [Link]

I think the SuSE support for 2.6.32 is paying Greg KH to do that work.

http://lwn.net/Articles/371535/
http://lwn.net/Articles/371788/

SCALE 8x: Ubuntu kernel development process

Posted Mar 4, 2010 18:39 UTC (Thu) by BenHutchings (subscriber, #37955) [Link]

... and probably the next Debian.

This was agreed this between the Debian and Ubuntu kernel teams. If the release slips a long way we might have to revisit it, but we are still intending to release with 2.6.32.

I've seen rumors/predictions (based on a leaked internal build name) for RHEL6-may-run-2.6.32; but this seems weak. Do you have more information about that?

My bug report on RHEL requesting a driver update from 2.6.33 was deferred to RHEL 6.1, so as far as I'm concerned this proves they are going with .32. However that bug report is non-public so I can't show you the evidence.

Will Ubuntu kernel follow stable upstram?

Posted Mar 5, 2010 11:52 UTC (Fri) by sdalley (subscriber, #18550) [Link]

>Once the kernel version has been frozen for a release, the management of
>that kernel is much more strictly controlled. The only patches that get
>applied are those that have a bug associated with them. Stable kernel
>patches are "cherry-picked" based on user or security problems. There is a
>full-time kernel bug triager that tries to determine if a bug reporter has
>included enough information to have any hope of finding the
>problem—otherwise it gets dropped. One way to ensure a bug gets fixed,
>though, is to "show the upstream patch that fixes the problem"; if that
>happens, it will get pulled into the kernel, Graner said.

This implies that Ubuntu will NOT be following the upstream stable 2.6.32.n updates, but will instead be cherry-picking their own independent set based on their own bug reports. Fixes that have been incorporated for which Ubuntu have no bug reports will be dropped. Sounds rather a waste. Why not patch on top of upstream?

heh

Posted Mar 11, 2010 18:44 UTC (Thu) by gvy (guest, #11981) [Link]

> Why not patch on top of upstream?
Because there should be another ancient african word meaning "we'll make a baby every six months and propose practicing that to others too".

Burning out scarce developers and totally missing user education is not going to get anyone anywhere reasonable. :(

SCALE 8x: Ubuntu kernel development process

Posted Mar 16, 2010 18:18 UTC (Tue) by mjc777 (guest, #31558) [Link]

I'm 'old school'... so please bear with me: Does anyone know if after all this 'git'/'patch'/'bug-fix' if it is possible to actually express the Ubuntu Linux/kernel (in particular: karmic/9.10) simply as a kernel.org/reference plus a list of patches (be they kernel, driver, and/or bug patches)? In other words is the Ubuntu Linux/kernel reproducible from source? And if so how? In other words can anyone outside of the 'Ubuntu development team' tell what goes into the Ubuntu kernel 'recipe'? My guess right now might me no - I hope I'm wrong?

Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds