All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: ksummit-discuss@lists.linuxfoundation.org
Subject: Re: [Ksummit-discuss] [topic proposal] tracepoints and ABI stability warranties
Date: Wed, 7 Sep 2016 06:10:39 +0100	[thread overview]
Message-ID: <20160907051039.GG2356@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20160906224100.GA17212@p183.telecom.by>

On Wed, Sep 07, 2016 at 01:41:00AM +0300, Alexey Dobriyan wrote:

> Gentlemen's agreement then:
> * kernel developers don't break tracepoints on purpose and maintain
>   compatibility in simple cases (long => int, deleted field, etc),
> * real, justified tracepoint breakage doesn't count.

No go.  Scenario:

1) piss-poor API is added in form of tracehook.  It exports some information
that can be used to derive something genuinely interesting.  Most of the
time.  Corner cases are unsolvable, even though it might be possible to
provide the interesting part sanely.  Just not in that form.  Moreover,
faking the bits used to derive that information so that existing userland
logics would yield the right result is bloody hard and restricts what we
can do kernel-side, even though the real thing userland wants would not have
such problems.

2) userland code of matching quality is added to a certain daemon.  Tons
of boxen become dependent on that thing _in_ _that_ _shitty_ _form_.

3) you notice the problems kernel-side and make changes that break the damn
thing.

4) daemon authors come complaining.  You refer them to the "gentlemen's
agreement".  They refer you to the Figure 1 and inform you that if you didn't
want that API to be used, you shouldn't have allowed it into the kernel.
Correctly on both counts, at that.  Incidentally, that agreement of yours is
not something they signed upon, and what's that "gentleman" thing anyway?
Linus informs you that you are a particularly obtuse idiot and haven't you
learnt that WE DON'T BREAK USERLAND CODE, DAMNIT by now?

5) you are stuck keeping that turd, no matter the cost.  Adding a replacement
API (sanely designed this time) that would allow to get the same information
is welcome, but it doesn't relieve you from keeping both at least for 5-6
years.

Tracepoints are easy to add for quick debugging/instrumentation/etc. and
that's what makes them useful; OTOH, for a stable API you want more time
going into design and review, or you'll pay a _lot_ more maintaining it.
The thing is, API that has started with no intention to turn it into stable one
might end up become just that.  Your agreement is basically that tracepoints
should never become stable APIs, but that train has left years ago.

One way to deal with that is to refuse to accept any tracepoints in the area
you maintain.  Another might be to differentiate between stable and unstable
ones, with much more review for the former and a very explicit "if you
ever want to use that for more than one kernel version, you get to keep it
working yourself" about the latter.  But that only works if it's visible to
userland *and* Linus agrees that anything of that sort will not get the
normal stable API treatment, i.e. "real code uses it, you get to keep it
working".

  parent reply	other threads:[~2016-09-07  5:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 18:51 [Ksummit-discuss] [topic proposal] tracepoints and ABI stability warranties Al Viro
2016-09-06 19:22 ` Steven Rostedt
2016-09-06 21:36   ` Alexey Dobriyan
2016-09-06 21:53     ` Steven Rostedt
2016-09-06 22:41       ` Alexey Dobriyan
2016-09-06 23:12         ` Steven Rostedt
2016-09-08 11:43           ` Alexey Dobriyan
2016-09-07  5:10         ` Al Viro [this message]
2016-09-07  5:30           ` Andy Lutomirski
2016-09-07  6:41             ` Vlastimil Babka
2016-09-19 12:51               ` Michal Hocko
2016-09-07 13:15             ` Christian Borntraeger
2016-09-07 15:30             ` Shuah Khan
2016-09-07 16:10               ` Rik van Riel
2016-09-08  3:24                 ` Masami Hiramatsu
2016-09-15 19:23                 ` Mark Brown
2016-09-06 22:02     ` Alexey Dobriyan
2016-09-06 22:15       ` Steven Rostedt
2016-09-06 21:05 ` Shuah Khan
2016-09-08  3:13   ` Masami Hiramatsu
2016-09-07 23:17 ` Masami Hiramatsu

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=20160907051039.GG2356@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=adobriyan@gmail.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.