|
|
Log in / Subscribe / Register

The stable tree

By Jonathan Corbet
August 20, 2014

Kernel Summit 2014
While much attention goes into the development of the mainline kernel, most users end up running something based on the stable tree, which incorporates important fixes after the mainline process has moved on. A session during the first day of the 2014 Kernel Summit, led by Greg Kroah-Hartman and Li Zefan, discussed the management of the stable tree and how things could be done better. In the end, it seems, there is little room for improvement at the moment.

Greg started off by noting that, one year ago, he had asked developers to do a better job of ensuring that important patches make it to the stable tree. In that time, he said, things have gotten a lot better, to the point that he does not know of a single subsystem that is not doing it right. Important fixes from all over the kernel are now finding their way into the stable tree.

That said, he did note that he found it a bit strange that the 3.17-rc1 release had 200 patches marked for backporting to the stable tree. If the patches are truly important fixes, they should not wait for -rc1; instead, they should go into the mainline quickly. Dave Airlie suggested that the problem is that "people are scared of Linus" and are holding their fixes [Li Zefan] for -rc1 whenever they are in doubt. Greg noted that some of those patches are non-critical things like new device IDs, but others should perhaps be tracked into the mainline more quickly.

Greg announced that he will no longer be managing the 3.4 long-term stable kernel; that task has been passed over to Li.

Dmitry Torokhov asked if there weren't perhaps too many patches going into the stable trees. Might it make sense, he asked, to split stable into two trees, one of which would be only fixes while the other would handle new-device enablement. Greg responded that, when looked at individually, every patch going into stable seems to make sense when it is added. As a percentage of the total patch flow into the kernel, even hundreds of patches going into the stable tree are a drop in the bucket.

Eric Biederman said that, over time, the stable kernels really do get more stable. Chris Mason added that, at Facebook, they have not seen a single regression caused by a patch added to the 3.10 stable tree.

Rusty Russell asked if developers should be even more aggressive about sending patches to the stable tree. Perhaps fixes for performance regressions should go there as well? Greg responded that performance fixes are already accepted into the stable trees; they seem to be wanted, so he will take them. Mel Gorman added that there has been a determined effort to get important performance fixes into the stable kernels in an attempt to reduce the performance deltas between various kernel versions. In particular, it is not desirable that stable releases perform notably worse than distributor kernels, which tend to have those performance fixes mixed in.

The subject of the extended stable kernels maintained by developers at Canonical came up. Greg said that, for the most part, those kernels could be ignored; Canonical is doing its own thing there. Peter Anvin complained about the use of the same numbering space for Canonical's kernels; that, he said, can be confusing. He would like to see those kernels named in a way that makes it [Greg KH] clear that they are not "official" stable releases. In response to a question about hosting those kernels on kernel.org, Greg noted that he will hand a stable kernel space over to any community developer in good standing. Canonical's developers, he said, are not that; they do not do work within the community. Since he cannot trust their work, he doesn't want their kernels on kernel.org.

Andy Lutomirski asked how he could mark a patch as applying only to the 3.16 kernel; the answer is to put "# v3.16+" in the patch tags. The use of the "Fixes:" tag can also help a lot, Greg said. But, he added, if a patch has a "Fixes: tag for an old bug, that patch should be directed toward the stable tree; apparently that does not always happen. Rusty asked about patches for theoretical bugs that have not been reported by actual users; Greg said they can be submitted, and he takes about a quarter of them.

What about the Long-Term Support Initiative kernels? Darren Hart noted that kernel developers tend to scoff at those kernels, but, from his experience, they tend to reduce duplicate backports and are thus useful. Greg said that they can be seen as an "embedded Linux enterprise kernel" and that, most of the time, it's better to just use a newer kernel. Christoph Hellwig complained about the addition of out-of-tree code to those kernels, but Greg said that LTTng is the only out-of-tree patch in LTSI, and that everybody in the embedded space needs it. Mark Brown said that the short merge window for LTSI is problematic; Greg responded that patches could be sent to him anytime and they would get into LTSI when the window opened.

Getting back to the long-term kernels maintained by Greg, Josh Triplett said that it would be nice to know which kernels will be receiving long-term support ahead of time. The problem with advance notification, Greg said, is that "then people merge a lot of crap" to get it into that release. It was suggested that the announcement could be made after the -rc1 release, making the premature merging of unready code impossible, but, in the end, a few weeks additional notice is not going to change things much. In the end, he said, distributors who are wondering about which kernel will get long-term support should just talk to him.

Linus, jumping in for the first time this day, let it be know that he dislikes developers who try to game the timing of long-term kernels. Rather than wait until code is ready or fix it on time, they rely on the stable kernels to get fixes out to users eventually. It is, he said, just not good development to do things that way.

The session wound down with a question: rather than use stable kernels, should companies put current mainline kernels into their products? Olof Johansson responded that he has tried that and "has some battle scars" to prove it. He has seen regressions with mainline kernels, especially on older hardware, which tends not to see much mainline testing. Ben Herrenschmidt added that subsystems like multipath I/O often regress; upgrades cause things to break. Linus said that that sort of attitude tends to perpetuate the problem. This unwillingness to risk problems with mainline kernels is unlikely to change, though, so the stable kernel series is going to prove useful for some time yet.

Next: The state of linux-next.

Index entries for this article
KernelDevelopment model/Stable tree
ConferenceKernel Summit/2014


to post comments

The stable tree

Posted Aug 20, 2014 16:31 UTC (Wed) by bnorris (subscriber, #92090) [Link] (2 responses)

> The problem with advance notification, Greg said, is that "then people merge a lot of crap" to get it into that release.

Shouldn't the normal kernel development process ensure that only code that is ready actually makes it into the release? Doesn't this statement show a lack of faith in the process? This seems like a weak argument for restricting information that could just as well be helpful to those planning internal kernel releases.

The stable tree

Posted Aug 20, 2014 20:21 UTC (Wed) by neilbrown (subscriber, #359) [Link]

> Shouldn't the normal kernel development process ensure that only code that is ready actually makes it into the release?

Wouldn't that be nice! The trouble is that "my" code (for any given "me") is always more ready than "your" code. This is troubling because, as was on the agenda for the Kernel Summit this week, there aren't enough people doing review. So lots of voices say "my code is ready" and not enough say "your code is not".

> Doesn't this statement show a lack of faith in the process?

Faith is based on evidence. I would say this statement shows an astute understanding of the available evidence.

Note that I'm not saying that the process is a disaster - it isn't and it mostly works quite well. Part of the reason is that we try to avoid practices that seem to encourage bad behaviour.

The stable tree

Posted Aug 21, 2014 6:05 UTC (Thu) by gregkh (subscriber, #8) [Link]

> Doesn't this statement show a lack of faith in the process?

No, this statement shows an understanding of how humans work, and most importantly, what has happened in the past for every time that I have told people about what kernel release will be maintained as a longterm kernel.

I do this for a real reason, because we have had bad problems in the past that I never want to repeat again, as it took a long time to unwind some of them.

The stable tree

Posted Aug 21, 2014 1:49 UTC (Thu) by sjj (guest, #2020) [Link] (3 responses)

Greg noted that he will hand a stable kernel space over to any community developer in good standing. Canonical's developers, he said, are not that; they do not do work within the community. Since he cannot trust their work, he doesn't want their kernels on kernel.org.
This is pretty sad but not unsurprising statement about Canonical's attitude.

The stable tree

Posted Aug 21, 2014 19:32 UTC (Thu) by robbiew (guest, #57380) [Link]

The stable tree

Posted Aug 22, 2014 21:56 UTC (Fri) by kirkland (guest, #53307) [Link] (1 responses)

Yes, the statement is sad.

That people think the statement is correct, or accurate, just because it came from GregKH, is even more sad.

The stable tree

Posted Aug 24, 2014 20:10 UTC (Sun) by gregkh (subscriber, #8) [Link]

The people doing their "stable" kernel releases are not members of the kernel community, so please explain how my statement is not correct.

Sorry you feel sad about this, but it's not my job to make you happy...

The stable tree

Posted Aug 21, 2014 2:46 UTC (Thu) by nevets (subscriber, #11875) [Link] (4 responses)

As for patches marked as stable in -rc releases. I have to say that I'm guilty of that as well. But a lot of times that I do so is not because I didn't want to send Linus a patch in the later -rcs (I use to do that, in fact, I'm the one that originally told Linus he's more scary than Greg). But now, I tend to test my stable patches for some time to make sure they do not cause regressions. Well, try to keep from causing regressions, as there is never any guarantee. Just happens that people start to report hard to hit bugs at the end of the -rcs and by the time I get the patch ready, the new release is out.

The stable tree

Posted Aug 21, 2014 3:15 UTC (Thu) by neilbrown (subscriber, #359) [Link] (3 responses)

Testing -stable patches is definitely important. Sometimes a "trivial" fix is actually wrong and makes things worse.
Some fixes suitable for stable are non-urgent and so would be best going into -rc1 and not appearing in -stable until they make it all the way to -final.
(And yes, I have an experience where that protocol would have produced a much better outcome).

The stable tree

Posted Aug 21, 2014 3:35 UTC (Thu) by nevets (subscriber, #11875) [Link] (1 responses)

I'm currently fighting a not so trivial bug where the fix needs to go into 3.16. But each fix I come up with, seems to add a much more subtle bug. Thus, I'm thinking of pushing this to mainline, and wait a full rc cycle before asking Greg to pull it into 3.16.

The stable tree

Posted Aug 21, 2014 5:22 UTC (Thu) by gregkh (subscriber, #8) [Link]

And that's fine, you can also mark a patch for stable and ask for me to wait a whole kernel release, or a number of -rc releases, before adding it to the stable tree.

SCSI has done this in the past with a simple:

Cc: stable <stable@...> # after 3.17-rc4 is out

In the signed-off-by: area of the patch.

The stable tree

Posted Aug 21, 2014 6:25 UTC (Thu) by dlang (guest, #313) [Link]

> Testing -stable patches is definitely important. Sometimes a "trivial" fix is actually wrong and makes things worse.

What's worse, usually the breakage doesn't happen on the tester's equipment, so the "trivial" fix works for them, but breaks someone else's hardware.

When it's driver changes, this can be really hard to identify.

Patch tag

Posted Aug 21, 2014 14:32 UTC (Thu) by jnareb (subscriber, #46500) [Link] (1 responses)

> Andy Lutomirski asked how he could mark a patch as applying only to the 3.16 kernel; the answer is to put "# v3.16+" in the patch tags.

How such patch tag looks like, and where it is put? Can I have example to see if this notation can be used by other projects?

Patch tag

Posted Aug 24, 2014 20:11 UTC (Sun) by gregkh (subscriber, #8) [Link]

Read the kernel file, Documentation/stable_kernel_rules.txt for the format of the tag and how it all works.

The stable tree

Posted Aug 24, 2014 3:59 UTC (Sun) by dlang (guest, #313) [Link] (1 responses)

> should companies put current mainline kernels into their products? Olof Johansson responded that he has tried that and "has some battle scars" to prove it

how recently was it tried? the mainline kernel has been through many different development methodologies, and what failed utterly in the 2.4 or earlier 2.6 days could work well with the current model.

The stable tree

Posted Aug 24, 2014 20:12 UTC (Sun) by gregkh (subscriber, #8) [Link]

It all depends on the hardware you are using, there is on very well known graphics chipset that has known to have regressions. If you don't use that hardware, all should be good, it all depends on your specific systems.


Copyright © 2014, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds