From: Mathieu Desnoyers <compudj@krystal.dyndns.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
devel@driverdev.osuosl.org, "Ted Ts'o" <tytso@mit.edu>,
Peter Zijlstra <peterz@infradead.org>, Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
lttng-dev@lists.lttng.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [lttng-dev] Perf ABI (was: Re: [PATCH 09/11] sched: export task_prio to GPL modules)
Date: Thu, 12 Jan 2012 10:39:57 -0500 [thread overview]
Message-ID: <20120112153957.GA20514@Krystal> (raw)
In-Reply-To: <1326380042.7642.73.camel@gandalf.stny.rr.com>
* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Thu, 2012-01-12 at 09:09 -0500, Mathieu Desnoyers wrote:
>
>
> > It is important to clarify that tracing is, in my opinion, not part of
> > the runtime support, which makes it very different by nature from
> > filesystems and kernel runtime support. So I agree with Linus' argument
> > about not breaking userspace when applied to runtime support, because
> > being unable to even boot a system due to an ABI breakage is very much
> > unwanted. However, I think it should not be applied as-is to tracing,
> > because you cannot make a system unusable due to a tracer ABI breakage:
> > if a tracer can be packaged in a set of standalone modules, that clearly
> > shows it is not part of the system runtime support.
>
> Correct that tracing is not something that needs to make the system run,
> but that's still no excuse to make ABI changes any different. Note, we
> don't change things within the /proc/stat or /proc/*/stat and that's not
> required to make the system run. We can add onto those files, but we
> can't change what the current numbers mean.
This is because this stat ABI is volountarily exposed like this. It does
not mean that this is the case everywhere else in the kernel. And it
might not be the right way to expose it: I bet that PeterZ would really
like to get the thread priority value removed from /proc/*/stat, because
it exposes something "internal" to the scheduler from his point of view,
but this particular ABI has chosen to evolve without ever retiring a
value previously exported.
>
> >
> > That being said, ABI versioning could still handle ABI changes without
> > significantly impacting the users: when an ABI breakage is needed, we
> > can keep the old code around for a while and expose both the old and new
> > ABIs. This would ensure that the user-level tools can query for the
> > specific ABI major version(s) they support. That should improve the user
> > experience by providing "deprecated" console warnings for a few kernel
> > releases before the old code ends up being removed.
>
> ABI version numbers are meaningless, and prone to be broken. The change
> would have to be added with the commit that updates the change otherwise
> git bisecting can get screwed up too.
Of course, the commit that updates the code would "fork" to a new ABI if
it ever need to diverge from the old one.
> The way ABI changes in the kernel have always been was to look at the
> file itself and have the tool be able to determine what version of the
> ABI is there based on what files exists, or what exists in the file.
> I've done this with trace-cmd and ftrace. The debugfs system has changed
> a lot, and trace-cmd can handle each change. I never had a need for a
> version number to do this. I simply have trace-cmd look at what is
> available and what isn't.
>
> If you need to know if a syscall exists, you try it and if you get
> -ENOSYS, then you know it doesn't exist. We have no need for an
> arbitrary version number that is meaningless. The existence of (or lack
> of) tells us all we need to know.
pipe()/pipe2()
dup()/dup2()/dup3()
umount()/umount2()
mmap()/mmap2()
madvise()/madvise1()
eventfd()/eventfd2()
Those look very much like major version numbers to me. And these are
entirely compatible with your statement above about using -ENOSYS to
detect if the major version number is implemented or not.
If your only concern is that the major version number should be part of
the ABI name (as in the examples above), that can be arranged.
>
> >
> > So, in summary:
> >
> > * Old kernels vs new tools:
> >
> > New tools can query for the latest ABI they know, and fall-back on older
> > ABIs, with limited features.
> >
> > * New kernels vs old tools:
> >
> > Keeping around the old ABI for a deprecation phase lets old tools work on
> > a bleeding edge kernel while the ABI change is being introduced, which
> > should satisfy the kernel developer use-case.
>
> We've done this without version numbers. Just look at all the udev
> changes.
Are you seriously refering to udev as an example of how to handle
changes, or as one of the worse ABI breakage mess that happened in the
Linux kernel history ? My own experience as a Linux users (in the
era around 2.6.12 kernels if my memory serves me right) lead me to think
it's the latter. And because udev is part of the runtime support, that
indeed led to non-bootable systems and lots of frustrated users.
Thanks,
Mathieu
>
> -- Steve
>
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2012-01-12 15:40 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1322775683-8741-1-git-send-email-mathieu.desnoyers@efficios.com>
2011-12-01 21:41 ` [PATCH 01/11] mm: export vmalloc_sync_all symbol to GPL modules Mathieu Desnoyers
2011-12-01 21:57 ` Christoph Hellwig
2011-12-01 22:13 ` Greg KH
2011-12-01 22:19 ` Mathieu Desnoyers
2011-12-01 22:41 ` Greg KH
2011-12-01 22:28 ` Christoph Hellwig
2011-12-01 23:00 ` Greg KH
2011-12-01 21:41 ` [PATCH 03/11] fs/splice: export splice_to_pipe " Mathieu Desnoyers
2011-12-02 7:19 ` Jens Axboe
2011-12-02 12:32 ` Mathieu Desnoyers
2011-12-01 21:41 ` [PATCH 09/11] sched: export task_prio " Mathieu Desnoyers
2011-12-01 21:56 ` Peter Zijlstra
2011-12-01 22:04 ` Mathieu Desnoyers
2011-12-01 22:10 ` Peter Zijlstra
2011-12-01 22:15 ` Mathieu Desnoyers
2011-12-01 22:36 ` Mathieu Desnoyers
2011-12-01 23:05 ` Peter Zijlstra
2011-12-02 13:51 ` Mathieu Desnoyers
2011-12-01 23:06 ` Peter Zijlstra
2011-12-01 23:18 ` Greg KH
2011-12-01 23:47 ` Mathieu Desnoyers
2011-12-01 22:14 ` Greg KH
2011-12-01 22:20 ` Mathieu Desnoyers
2011-12-01 23:07 ` Peter Zijlstra
2011-12-01 23:17 ` Greg KH
2011-12-05 14:17 ` Ingo Molnar
2011-12-06 21:44 ` Greg KH
2011-12-08 5:23 ` Ingo Molnar
2011-12-08 23:27 ` Greg KH
2011-12-19 10:49 ` Ingo Molnar
2011-12-19 15:30 ` [lttng-dev] " Mathieu Desnoyers
2011-12-20 11:08 ` Ingo Molnar
2011-12-20 21:46 ` Frank Rowand
2011-12-23 10:51 ` Ingo Molnar
2011-12-21 18:47 ` Aaron Spear
2011-12-21 18:58 ` Christoph Hellwig
2011-12-23 16:46 ` Perf ABI (was: Re: [lttng-dev] [PATCH 09/11] sched: export task_prio to GPL modules) Mathieu Desnoyers
2011-12-23 17:21 ` Ted Ts'o
2011-12-23 18:16 ` Mathieu Desnoyers
2011-12-25 17:46 ` Ted Ts'o
2012-01-12 14:09 ` Mathieu Desnoyers
2012-01-12 14:54 ` Steven Rostedt
2012-01-12 15:39 ` Mathieu Desnoyers [this message]
2012-01-12 15:53 ` [lttng-dev] Perf ABI (was: " Steven Rostedt
2012-01-12 15:59 ` Steven Rostedt
2012-01-12 16:27 ` Mathieu Desnoyers
2012-01-12 16:34 ` Steven Rostedt
2012-01-12 20:00 ` Greg KH
2012-01-16 8:55 ` Ingo Molnar
2011-12-07 22:57 ` [PATCH 09/11] sched: export task_prio to GPL modules Mathieu Desnoyers
2011-12-08 5:40 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120112153957.GA20514@Krystal \
--to=compudj@krystal.dyndns.org \
--cc=acme@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lttng-dev@lists.lttng.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox