LWN.net Logo

LTTng rejection, next generation

By Jonathan Corbet
December 14, 2011
The story of tracing in the Linux kernel sometimes seems to resemble a bad multi-season TV soap opera. We have no end of strong characters, plot twists, independent story lines, recurring themes, and conflicting agendas. The cast changes slowly over time, but things never seem to come to any sort of satisfying conclusion. Those watching the show might be forgiven for thinking that one of those story lines might be about to be wrapped up when the LTTng tracing system was pulled into the staging tree for the 3.3 merge window. But they should have known that they were just being set up for another sad twist in the plot.

LTTng descends from some of the earliest dynamic tracing work done for Linux. Its distinguishing characteristics include integrated kernel- and user-space tracing, performance sufficient to deal with high-bandwidth event streams, and a well-developed set of capture and analysis tools. LTTng has always been maintained out of the mainline kernel tree, but it is packaged by a number of distributors and has base of dedicated users, some of whom have been happy to fund ongoing LTTng development work.

Had LTTng been merged years ago, the story may have been much simpler, but, for a number of reasons (including the simple fact that, for years, any sort of tracing capability was hard to sell to the kernel development community) that did not happen. So we have ended up with a number of projects in this area, including SystemTap (which also remains out-of-tree), and the in-tree ftrace and perf subsystems. Naturally, none of these solutions has proved entirely satisfactory so, while there has been a fair amount of pressure to consolidate the various tracing projects, that has tended not to happen.

That is not to say that there has been no progress at all. Some agreement has been reached on the format of tracepoints themselves; much of the work in that area was done by primary LTTng maintainer Mathieu Desnoyers. As a result, the number of tracepoints in the kernel has been growing rapidly, making kernel operations more visible to users in a number of ways. A lot of talk about merging more infrastructure has been heard over the years - said talk was often audible from a great distance at various conferences - but progress has been minimal. It seems to be easy for developers in this area to get bogged down on the details of ring buffers, event formats, and so on at the expense of producing an actual, usable solution.

To Mathieu, merging into the staging tree must have looked like an attractive way to push things forward. The relaxed rules for that tree would allow the code into the mainline where its visibility would increase, any remaining issues could be fixed up, and more users could be found. It all seemed to be working - some cleanup patches from new developers were posted - until Mathieu tried to add exports for some core kernel symbols so LTTng could access them. That attracted the attention of the core kernel developers who, to put it gently, were not impressed with what they saw.

In the end, Ingo Molnar vetoed the whole patch series and asked Greg Kroah-Hartman to remove the LTTng code from staging. Greg complied with that request, with the result that LTTng is, once again, no closer to merging into the mainline than it was before. This particular story line, it seems, has at least one more season to run yet.

What is it about LTTng that makes it unsuitable for merging into the mainline? It starts with a lot of duplicated infrastructure. Inevitably, LTTng brings in its own ring buffer to communicate events to user space, despite the fact that the two ring buffers used by perf and ftrace are already seen as being too many. There is a new instrumentation mechanism for system calls - something that the kernel already has. And, of course, there is a new user-space ABI to control all of this - again an unwelcome addition when there is strong pressure from some directions to merge the existing in-kernel tracing ABIs.

Duplicated infrastructure always tends to be hard to merge into the mainline; duplicated user-space ABIs, which must be supported forever, are even more so. It is thus not surprising that there is pushback against these patches, even without considering the highly contentious nature of the discussion around tracing work in general. Ingo claims to be receptive to merging the parts of LTTng that are better than what the kernel has now - after it has been unified with the existing infrastructure, of course - but, he says, Mathieu has been more interested in maintaining LTTng as a separate "brand" and has been unwilling to merge things in this way.

Mathieu's response has not done much to address those concerns. Duplicate infrastructure, he said, is fine as long as there is no agreement on how that infrastructure should work. Thus, he said, it is better to get his ring buffer into the mainline and to try to work out the differences there. He takes a similar approach to the ABI:

Interfaces to user-space: very much like filesystems, these ABIs don't need to be shared across projects that have different use-cases. Having multiple tracer ABIs, if self-contained, should not hurt anybody and just increase the rate of innovation.

The points that are missed here are that (1) filesystems do, in fact, share the same ABI, and (2) there is indeed a cost to multiple ABIs for tracing. Those ABIs have to be maintained indefinitely and they fragment the efforts of tool developers who find themselves forced to choose one or the other. Unless he can produce a convincing proof that the existing kernel interfaces cannot possibly be extended to meet LTTng's needs, Mathieu will almost certainly not succeed in getting a new tracing ABI into the mainline.

Two notable conclusions were reached at the 2011 Kernel Summit. One was that maintainers should say "no" more often and accept fewer new features into the mainline; that would argue that Ingo and others are right to block the addition of LTTng in its current form. But the other conclusion was that code that has been shipped for years and that has real users should be strongly considered for merging even if it has known technical shortcomings. That, of course, would argue for merging LTTng, which certainly meets those conditions. Given the players involved, that conflict seems almost certain to be resolved with LTTng remaining an active project out of the mainline. Tune in next year for another episode of "As the tracing world turns."


(Log in to post comments)

LTTng rejection, next generation

Posted Dec 15, 2011 4:36 UTC (Thu) by karim (subscriber, #114) [Link]

I posted the original LTT code in July 1999. We are December 2011.

The continued lack of a holistic tracing infrastructure for end users in Linux while other OSes have been shipping with this stuff for decades likely demonstrates that existing political equilibriums and fear of confronting the egos of certain kernel developers are being placed above user needs. The same stuff early Linux proponents were pointing out as a deficiency of the development of the older unixen.

Disclaimer: no relationship, other than possibly the name, exists between current LTTng work and the defunct LTT project. I do NOT speak in the name of LTTng in any way. Nor have I in fact been involved with in any way other than the occasional "so where's tracing these days?" sent to Mathieu. I left tracing altogether in 2005 in utter disgust after fighting for 6 years to get it mainlined. And I have no regrets of having done that thank you very much :)

LTTng rejection, next generation

Posted Dec 15, 2011 7:02 UTC (Thu) by viro (subscriber, #7872) [Link]

> The continued lack of a holistic tracing infrastructure for end users in Linux

holistic /a/: impressive until one looks at the details.

Or did you mean something else?

LTTng rejection, next generation

Posted Dec 16, 2011 6:20 UTC (Fri) by tbird20d (subscriber, #1901) [Link]

holistic: relating to or concerned with wholes or with complete systems rather than with the analysis of, treatment of, or dissection into parts
(Merriam-Webster online dictionary)

I couldn't find the definition you offered, and I suspect you made it up to be rude. For what end, I have no idea.

LTTng rejection, next generation

Posted Dec 16, 2011 7:32 UTC (Fri) by viro (subscriber, #7872) [Link]

Look at the actual uses of that term. Alt.med scam artists, newage crackpots jumping around "quantum consciousness", et revolting cetera. It's a very convenient buzzword when one wants to say "don't look at the details". Usually because looking at the details shows that grand idea is actually full of crap.

I don't know why karim had used it; I stayed out of LTT flamefests all along (and plan to stay out of those, thank you very much - I have no axe to grind there and no desire to get one). Thus the question...

As for the source of that definition... It's obviously too late to be from Bierce (the buzzword in question had been invented more than a decade after his death) and it's almost certainly modelled after The Devil's Dictionary. I can try to find where had I seen it, might have been someone's .sig. I agree with the sentiment, anyway...

Basically, as Bayesian filters go, this term is a strong indication that bullshit is coming. Not 100% certain, but then there are maillists where the words "erectile disfunction" are not 100% certain indication of spam...

LTTng rejection, next generation

Posted Dec 16, 2011 18:11 UTC (Fri) by fuhchee (subscriber, #40059) [Link]

"Basically, as Bayesian filters go, this term is a strong indication that bullshit is coming."

I see your point, but by accusing Karim of this, you just participated in the "LTT flamefests".

LTTng rejection, next generation

Posted Dec 16, 2011 20:49 UTC (Fri) by viro (subscriber, #7872) [Link]

Except that I do not accuse him of anything... For fsck sake, imagine somebody using words "leveraging synergies" in a posting and getting in reply "what the hell?" along with a reference to e.g. http://dilbert.com/strips/comic/2006-09-05/

His overall point might or might not be valid; I don't know if the reasons for rejection of LTT had been political or not and I don't know how much merits did the thing have - both back in '98 and today. IIRC, the threads around that topic became flame-laden very fast and frankly, the quality of flames had not been high enough to read them for amusement sake. In principle, "invasive" and "monolithic" are legitimate complaints, provided that they do actually apply to patches in question. OTOH, it's not like they had been hard to throw around anyway, whether they do apply or not. My _only_ point in this reply had been "why the hell are you using that kind of buzzwords?"

LTTng rejection, next generation

Posted Dec 16, 2011 20:53 UTC (Fri) by viro (subscriber, #7872) [Link]

s/98/99/ in the above. BTW, is there any way to edit a posting for such typos?

LTTng rejection, next generation

Posted Dec 16, 2011 21:04 UTC (Fri) by nevets (subscriber, #11875) [Link]

BTW, is there any way to edit a posting for such typos?

I sure hope not. Fixing a typo by replying to your own comment, like you have done, I believe is the best answer.

If we could edit our own posts, I could imagine that someone could modify what they wrote, to make someone who replied to them look stupid.

Anyway, I really like the way Jon has it that we must preview our posts before we publish them. I do just that. That is, I reread what I wrote before I hit "publish".

LTTng rejection, next generation

Posted Dec 16, 2011 21:49 UTC (Fri) by nybble41 (subscriber, #55106) [Link]

> If we could edit our own posts, I could imagine that someone could modify what they wrote, to make someone who replied to them look stupid.

True, but there are reasonable mitigation strategies for that issue. Simply showing the time of the last edit solves most of the problem. For the rest, edits could be disallowed after replies are received (with a warning in the preview if a post was edited while you wrote your reply), or a different style could be used for posts which have been edited more recently than one or more of their replies. LWN could even record the history of each comment, which should be more than sufficient to keep everyone on their best behavior.

LTTng rejection, next generation

Posted Dec 16, 2011 23:50 UTC (Fri) by nevets (subscriber, #11875) [Link]

Egad that would complicate LWN. I'm sure Jon has enough to do than to add "special" features like that.

LTTng rejection, next generation

Posted Dec 16, 2011 23:48 UTC (Fri) by nevets (subscriber, #11875) [Link]

If we could edit our own posts, I could imagine that someone could modify what they wrote, to make someone who replied to them look stupid.

For example, if Karim removed the word "holistic" from his post, the rest of this thread would look silly.

LTTng rejection, next generation

Posted Dec 16, 2011 20:59 UTC (Fri) by nevets (subscriber, #11875) [Link]

Basically, as Bayesian filters go, the terms "Linux" and "tracing" are almost 100% certain that a flame war is about to happen!

LTTng rejection, next generation

Posted Dec 16, 2011 22:25 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

My _only_ point in this reply had been "why the hell are you using that kind of buzzwords?"

I suspect he just didn't know it was a buzzword. I didn't. While I'm aware of its prominent use to refer to a nonscientific and ineffective substitute for medicine, other than that, I just recognize it by the dictionary definition posted earlier. I haven't seen it used by the folks who leverage synergies to productize their content.

LTTng rejection, next generation

Posted Dec 18, 2011 15:00 UTC (Sun) by compudj (subscriber, #43335) [Link]

Hi Al,

You stated:
"In principle, "invasive" and "monolithic" are legitimate complaints, provided that they do actually apply to patches in question."

For the records, the current incarnation of LTTng is modular and non-intrusive: it's a stand-alone package organized as a set of modules that can be used as building blocks for a tracer.

Best regards,

Mathieu

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