All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>, David Sharp <dhsharp@google.com>,
	Vaibhav Nagarnaik <vnagarnaik@google.com>,
	Michael Rubin <mrubin@google.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Arjan van de Ven <arjan@linux.intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Thomas Gleixner <tglx@linutronix.de>,
	Christoph Hellwig <hch@infradead.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: Fix powerTOP regression with 2.6.39-rc5
Date: Tue, 10 May 2011 17:36:01 +1000	[thread overview]
Message-ID: <20110510073601.GD19446@dastard> (raw)
In-Reply-To: <1305005990.2969.158.camel@frodo>

On Tue, May 10, 2011 at 01:39:50AM -0400, Steven Rostedt wrote:
> On Tue, 2011-05-10 at 14:44 +1000, Dave Chinner wrote:
> > On Mon, May 09, 2011 at 11:07:27PM -0400, Steven Rostedt wrote:
> > > What happens if someone designs a tool that analyzes the XFS
> > > filesystem's 200+ tracepoints? Will all those tracepoints now become
> > > ABI?
> > 
> > That's crazy talk.
> 
> Right!
> 
> > 
> > XFS tracepoints are _not ever_ guaranteed to be consistent from one
> > kernel to another - they are highly dependent on the implementation
> > of the code, and as such will change *without warning*. This has
> > been the case for the XFS event subsystem since back in the days of
> > Irix (yes, that's where most of the events were originally
> > implemented). The fact that they are now exported via TRACE_EVENT()
> > (so no kernel debugger is needed) does not change the fact the
> > information is really for developer use only and as such are
> > volatile....
> 
> But what makes these tracepoints any different from any other
> tracepoint? Like power manament.

Perhaps the intent of the tracepoints needs to be taken into
account? The XFS tracepoints are primarily for developers debugging
the filesystem on a specific kernel revision, whereas something like
power management has userspace diagnostic tools (like powertop) that
want to work across multiple kernel revisions. IOWs, we have two
different and conflicting requirements from two separate and
non-interacting subsystems, both of which currently use the same
(unstable) event interface to provide the functionality.

So, if you are going to define tracepoints to be a stable ABI, then
really we need a TRACE_EVENT_STABLE() extension to define all the
events that are intended to be stable.  That would make the code
self documenting w.r.t. intent, enable unstable->stable transitions
when applications require events to be stable (on a case by case
basis) and, best of all, not require the majority of tracepoint
users to change anything.

> > So, if someone wants to write an application that parses the XFS
> > tracepoints directly, then they have to live with the fact that
> > tracepoints will come and go and change size and shape all the
> > time.
> 
> I totally agree. But that is our "wish" and may not reflect reality.

It has nothing to do with "wish". The reality is that the XFS
tracepoints are unstable and we change them at will.

> The
> whole point of this thread is if the kernel exports something to
> userspace (in a released kernel), and userspace tools start to depend on
> that data, the "reality" is that data just became an ABI, and Linus will
> revert any changes that breaks that tool.

Fmeh. Retrofitting a "one size fits all" model that clearly does not
fit the existing tracepoint use cases is a sure way to annoy people.
Trace points are currently unstable, and if we want them to be
stable we need to define a new interface with new semantics and
rules about how, when and what type of modifications are allowed.

> This is the precedence that I want to avoid. Yes, this may be "crazy
> talk", but the possibility of it happening exists. In this case, I
> rather be crazy than right.

So define a new a stable tracepoint ABI and convert everything that
userspace wants to be stable over to that.  That way if someone
writes an application that uses XFS tracepoints and wants them to be
stable across multiple releases, that's a discussion and decision
that can be made wholly within the XFS community. That is, stability
of tracepoints is (and should always be) a subsystem maintainer
decision, not a royal decree sent down from above that all serfs
must obey.

Define the model for a stable ABI, provide the infrastructure to
make it easy to define stable tracepoints, but leave the definition
of which tracepoints are stable up to those working intimately with
the tracepoints in question....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2011-05-10  7:36 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 20:08 Fix powerTOP regression with 2.6.39-rc5 Arjan van de Ven
2011-05-06 20:20 ` Steven Rostedt
2011-05-06 20:51   ` Linus Torvalds
2011-05-06 21:10     ` Steven Rostedt
2011-05-06 21:24       ` Linus Torvalds
2011-05-06 21:14     ` Steven Rostedt
2011-05-06 21:28       ` Linus Torvalds
2011-05-06 21:29     ` Arjan van de Ven
2011-05-06 21:57       ` Steven Rostedt
2011-05-07  6:58     ` Ingo Molnar
2011-05-07 10:45       ` Steven Rostedt
2011-05-07 14:44         ` Ingo Molnar
2011-05-07 17:20           ` Steven Rostedt
2011-05-07 17:59             ` Arjan van de Ven
2011-05-08 21:08               ` Frederic Weisbecker
2011-05-08 21:56                 ` Arjan van de Ven
2011-05-07 19:00             ` Ingo Molnar
2011-05-10  3:07               ` Steven Rostedt
2011-05-10  4:44                 ` Dave Chinner
2011-05-10  5:39                   ` Steven Rostedt
2011-05-10  7:36                     ` Dave Chinner [this message]
2011-05-10  7:54                 ` Ingo Molnar
2011-05-10  8:09                 ` Ingo Molnar
2011-05-10  8:32                   ` Arjan van de Ven
2011-05-10  8:44                     ` Ingo Molnar
2011-05-10  9:14                       ` Pekka Enberg
2011-05-10  8:41                 ` Ingo Molnar
2011-05-10 13:06                   ` Steven Rostedt
2011-05-11 21:51                     ` Ingo Molnar
2011-05-11 22:36                       ` Steven Rostedt
2011-05-17  7:15                       ` Michael Rubin
2011-05-17 11:19                         ` Steven Rostedt
2011-05-17 13:24                           ` David Ahern
2011-05-17 13:27                             ` Steven Rostedt
2011-05-17 13:30                               ` Ingo Molnar
2011-05-10  8:47                 ` Ingo Molnar
2011-05-10 10:33                   ` Steven Rostedt
2011-05-10 19:13                     ` David Sharp
2011-05-09 23:37             ` David Sharp
2011-05-10  7:39               ` 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=20110510073601.GD19446@dastard \
    --to=david@fromorbit.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=arjan@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=dhsharp@google.com \
    --cc=fweisbec@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mrubin@google.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=vnagarnaik@google.com \
    /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.