From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 2 Oct 2018 18:32:03 -0300 From: Mauro Carvalho Chehab To: Jani Nikula Message-ID: <20181002183203.1087fd69@coco.lan> In-Reply-To: <87va6kkagg.fsf@intel.com> References: <20181001140402.0799a8f0@gandalf.local.home> <87va6kkagg.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Ksummit-discuss@lists.linuxfoundation.org Subject: Re: [Ksummit-discuss] [MAINTAINERS SUMMIT] Moving debugfs file systems into sysfs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Em Tue, 02 Oct 2018 11:40:47 +0300 Jani Nikula escreveu: > On Mon, 01 Oct 2018, Steven Rostedt 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. Regards, Mauro Thanks, Mauro