mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jason Baron <jbaron@akamai.com>, Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org, kernel-team@android.com
Subject: Re: [PATCH v3] dynamic_debug: allow to work if debugfs is disabled
Date: Sat, 25 Jan 2020 10:11:30 -0700	[thread overview]
Message-ID: <20200125101130.449a8e4d@lwn.net> (raw)
In-Reply-To: <20200125014231.GI147870@mit.edu>

On Fri, 24 Jan 2020 20:42:31 -0500
"Theodore Y. Ts'o" <tytso@mit.edu> wrote:

> On Fri, Jan 24, 2020 at 08:29:40AM +0100, Greg Kroah-Hartman wrote:
> > > It's likely that people who normally use
> > > distribution kernels where debugfs is disabled will have scripts which
> > > are hard-coded to look in /proc, and then when they build a kernel
> > > with debugfs enabled, the /proc entry will go **poof**, and their
> > > script will break.  
> > 
> > **poof** they didn't test it :)
> > 
> > Seriously, I am doing this change to make it _easier_ for those people
> > who want debugfs disabled, yet want this type of debugging.  This is
> > much better than having no debugging at all.
> > 
> > Don't put extra complexity in the kernel for when it can be trivially
> > handled in userspace, you know this :)  
> 
> It's also trivial to handle this in the kernel by potentially having
> the control file appear in two places.  Consider what it would be like
> to explain this in the Linux documentation --- "the control file could
> be here, or it could be there", depending on how the kernel is
> configured.  The complexity of documenting this, and the complexity in
> userspace; and we have to have the code in the source code for the
> file to be in the appear in both places *anyway*.

FWIW, avoiding the need to document something like this has been a
motivating factor behind a number of my patches over the years.

Moving a control knob based on kernel configuration is a user-hostile
feature.  Scripts can be made to cope with this kind of behavior in one
place; if you let such things accumulate in a system, though, it gets to
the point where it's really hard for anybody to keep track of all the
pieces and be sure that their code will work.

If dynamic debug is meant to be a feature supported on all kernels, it
should, IMO, be lifted out of debugfs and made into a proper feature - with
a compatibility link left behind in debugfs for as long as it's needed, of
course.

</sermon> :)

jon

  reply	other threads:[~2020-01-25 17:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22  7:43 [PATCH] " Greg Kroah-Hartman
2020-01-22  8:03 ` Will Deacon
2020-01-22  8:12   ` Greg Kroah-Hartman
2020-01-22 13:53     ` [PATCH v2] " Greg Kroah-Hartman
2020-01-22 18:56       ` Jason Baron
2020-01-22 19:29         ` Greg Kroah-Hartman
2020-01-22 19:31           ` [PATCH v3] " Greg Kroah-Hartman
2020-01-22 21:43             ` Randy Dunlap
2020-01-23  8:48               ` Greg Kroah-Hartman
2020-01-23  8:50                 ` [PATCH v4] " Greg Kroah-Hartman
2020-01-23  9:36                   ` Will Deacon
2020-01-23 15:53             ` [PATCH v3] " Theodore Y. Ts'o
2020-01-23 17:55               ` Greg Kroah-Hartman
2020-01-24  6:02                 ` Theodore Y. Ts'o
2020-01-24  7:29                   ` Greg Kroah-Hartman
2020-01-25  1:42                     ` Theodore Y. Ts'o
2020-01-25 17:11                       ` Jonathan Corbet [this message]
2020-01-27 22:19                         ` Saravana Kannan
2020-02-09 11:05               ` [PATCH v5] " Greg Kroah-Hartman
2020-02-09 15:53                 ` Joe Perches
2020-02-09 17:03                   ` Greg Kroah-Hartman
2020-02-10 21:11                 ` [PATCH v6] " Greg Kroah-Hartman
2020-02-10 21:15                   ` Randy Dunlap
2020-02-12 21:58                     ` Greg Kroah-Hartman
2020-02-11 11:01                   ` Will Deacon
2020-01-25  0:03 ` [PATCH] " kbuild test robot

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=20200125101130.449a8e4d@lwn.net \
    --to=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbaron@akamai.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome