ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: Ksummit-discuss@lists.linuxfoundation.org
Subject: Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] Moving debugfs file systems into sysfs
Date: Wed, 03 Oct 2018 09:23:09 +0300	[thread overview]
Message-ID: <87woqzr1ki.fsf@intel.com> (raw)
In-Reply-To: <20181002183203.1087fd69@coco.lan>

On Tue, 02 Oct 2018, Mauro Carvalho Chehab <mchehab+samsung@kernel.org> wrote:
> Em Tue, 02 Oct 2018 11:40:47 +0300
> Jani Nikula <jani.nikula@intel.com> escreveu:
>
>> On Mon, 01 Oct 2018, Steven Rostedt <rostedt@goodmis.org> wrote:
>> > At Kernel Recipes, I talked with some people that have mature
>> > interfaces in the debugfs directory, but they can not access them on
>> > systems that have debugfs disabled. What would be the process to have
>> > these systems move out of debugfs? Should they create their own fs and
>> > be mounted in /sys/kernel, with a dedicated directory if the file system
>> > is enabled in the kernel (I had tracefs do that).
>> >
>> > Is this something we should discuss at Maintainers Summit? What is the
>> > process for mature debugfs directories? What's the justification to
>> > have them moved? Is there a better answer for this?  
>> 
>> I have a semi-related topic, hopefully not a complete thread
>> hijack... ;)
>> 
>> I think module parameters should primarily be viewed as debug knobs
>> rather than ABI. Things should just work instead of requiring the user
>> to tweak module parameters. Of course, there's the whole spectrum
>> between ABI and "unsafe" module parameters, and parameters get added for
>> a plethora of reasons.
>> 
>> However, all module parameters show up in sysfs instead of, say,
>> debugfs. Many debug options otherwise suitable for debugfs alone are
>> added as module parameters because of the convenience; with just a few
>> lines you can add the module parameter, get the sysfs, and have the
>> value be set before probe. There's nothing that compares, really.
>> 
>> I suppose primarily I'd like to find a convenient way to move module
>> parameters to debugfs, so the other way round than Steven. Do others
>> struggle with this? Any ideas, thoughts, pointers?
>
> Actually, there are several modprobe parameters on some media
> drivers that aren't debug-related. On very cheap hardware, sometimes
> the vendor doesn't put any eeprom at the device, or doesn't care enough
> to give a PCI or USB ID for his hardware.
>
> So, several media drivers have modprobe parameters in order to help
> the module to load the right configuration.
>
> There are more commonly found at PCI devices, but there are some USB
> ones that also need those. This is currently found on some really cheap
> video grabber boards.
>
> So, moving parameters from sysfs to debugfs is not the right thing
> to do, for such usecases. Also, we try to avoid touching the existing
> parameters like that, in order to avoid breaking userspace setups.

As I tried to say, there certainly are plenty of legitimate cases like
this. It's just that there are also plenty of cases where debugfs would
clearly be the right place, without a module parameter at all, but you
can't make the debug parameters take effect at probe time. Because you
obviously need to have the driver register the debugfs files first.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center

      reply	other threads:[~2018-10-03  6:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 18:04 Steven Rostedt
2018-10-02  1:18 ` Greg KH
2018-10-02  1:26   ` Greg KH
2018-10-02 13:07   ` Steven Rostedt
2018-10-02 14:59     ` Olof Johansson
2018-10-02 16:00       ` Shuah Khan
2018-10-02 16:17         ` Greg Kroah-Hartman
2018-10-02 16:30           ` Greg Kroah-Hartman
2018-10-02 21:37             ` Mauro Carvalho Chehab
2018-10-02 21:57               ` Shuah Khan
2018-10-02 22:22                 ` Greg Kroah-Hartman
2018-10-03 12:59                   ` Jan Kara
2018-10-03 13:40                     ` Greg Kroah-Hartman
2018-10-03 13:44                       ` Jiri Kosina
2018-10-03 14:32                         ` Greg Kroah-Hartman
2018-10-03 14:33                           ` Greg Kroah-Hartman
2018-10-04 11:50                             ` Jiri Kosina
2018-10-03 14:53                       ` Jan Kara
2018-10-04 16:11                         ` Takashi Iwai
2018-10-03 14:11                     ` Shuah Khan
2018-10-03 10:06               ` Sudeep Holla
2018-10-03 13:13                 ` Mark Brown
2018-10-03 14:52                   ` Sudeep Holla
2018-10-02  8:40 ` Jani Nikula
2018-10-02 13:11   ` Steven Rostedt
2018-10-02 21:32   ` Mauro Carvalho Chehab
2018-10-03  6:23     ` Jani Nikula [this message]

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=87woqzr1ki.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=Ksummit-discuss@lists.linuxfoundation.org \
    --cc=mchehab+samsung@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