public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: lsf-pc@lists.linux-foundation.org,
	Linux Filesystem Development List <linux-fsdevel@vger.kernel.org>,
	bpf@vger.kernel.org
Subject: Re: [LSF/MM/BPF TOPIC] time to reconsider tracepoints in the vfs?
Date: Fri, 17 Jan 2025 08:18:37 +1100	[thread overview]
Message-ID: <Z4l3rb11fJqNravu@dread.disaster.area> (raw)
In-Reply-To: <20250116124949.GA2446417@mit.edu>

On Thu, Jan 16, 2025 at 07:49:49AM -0500, Theodore Ts'o wrote:
> Historically, we have avoided adding tracepoints to the VFS because of
> concerns that tracepoints would be considered a userspace-level
> interface, and would therefore potentially constrain our ability to
> improve an interface which has been extremely performance critical.

Yes, the lack of tracepoints in the VFS is a fairly significant
issue when it comes to runtime debugging of production systems...

> I'd like to discuss whether in 2025, it's time to reconsider our
> reticence in adding tracepoints in the VFS layer.  First, while there
> has been a single incident of a tracepoint being used by programs that
> were distributed far and wide (powertop) such that we had to revert a
> change to a tracepoint that broke it --- that was ***14** years ago,
> in 2011.

Yes, that was a big mistake in multiple ways. Firstly, the app using
a tracepoint in this way. The second mistake was the response that
"tracepoints should be stable API" based on the abuse of a single
tracepoint.

We had extensive tracepoint coverage in subsystems *before* this
happened. In XFS, we had already converted hundreds of existing
debug-build-only tracing calls to use tracepoints based on the
understanding that tracepoints were *not* considered stable user
interfaces.

The fact that existing subsystem tracepoints already exposed the
internal implementation of objects like struct inode, struct file,
superblocks, etc simply wasn't considered when tracepoints were
declared "stable".

The fact is that it is simply not possible to maintain any sort of
useful introspection with the tracepoint infrastructure without
exposing internal implementation details that can change from kernel
to kernel.

> Across multiple other subsystems, many of
> which have added an extensive number of tracepoints, there has been
> only a single problem in over a decade, so I'd like to suggest that
> this concern may have not have been as serious as we had first
> thought.

Yes, these subsystems still operate under the "tracepoints are not
stable" understanding.  The reality is that userspace has *never*
been able to rely on tracepoints being stable across multiple kernel
releases, regardless of what anyone else (including Linus) says is
the policy.

> I'd like to propose that we experiment with adding tracepoints in
> early 2025, so that at the end of the year the year-end 2025 LTS
> kernels will have tracepoints that we are confident will be fit for
> purpose for BPF users.

Why does BPF even need tracepoints? BPF code should be using kprobes
to hook into the running kernel to monitor it, yes?

Regardless of BPF, why not just send patches to add the tracepoints
you want?

-Dave.
-- 
Dave Chinner
david@fromorbit.com

  parent reply	other threads:[~2025-01-16 21:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 12:49 [LSF/MM/BPF TOPIC] time to reconsider tracepoints in the vfs? Theodore Ts'o
2025-01-16 16:53 ` Al Viro
2025-01-16 17:29   ` [Lsf-pc] " Jan Kara
2025-01-16 17:20 ` Jan Kara
2025-01-20 15:43   ` Christian Brauner
2025-01-20 17:15     ` Jan Kara
2025-01-16 21:18 ` Dave Chinner [this message]
2025-01-16 21:43   ` Andrii Nakryiko
2025-01-17  2:20     ` Al Viro
2025-01-17 18:33       ` Andrii Nakryiko
2025-01-20 15:42     ` Christian Brauner
2025-01-18  3:07   ` Daniel Xu
2025-01-18  3:37     ` Al Viro

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=Z4l3rb11fJqNravu@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=bpf@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lsf-pc@lists.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