LWN: Comments on "debugfs: rules not welcome" https://lwn.net/Articles/429321/ This is a special feed containing comments posted to the individual LWN article titled "debugfs: rules not welcome". en-us Sun, 19 Oct 2025 10:21:06 +0000 Sun, 19 Oct 2025 10:21:06 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Developers versus administrators https://lwn.net/Articles/431968/ https://lwn.net/Articles/431968/ robbe <div class="FormattedComment"> If there wasn't an implicit backwards-compatibility guarantee for stuff in debugfs, people could simply move the "production-ready" parts like perf to a final place in sysfs without any hitch. Yes, they would be gone in debugfs, but you're not supposed to depend on anything there.<br> <p> Actually, I don't see the big problem. If you deem /debugfs/foo/{bar,baz} such production interfaces, why not move them to /sysfs/.../foo/{bar,baz} and provide the compatibility via a symlink? Is that really a maintenance burden?<br> <p> I'd really like a mirror policy for phasing out ABI. I.e. if an interface has been in the kernel for X releases and Y years when it goes on the deprecation list, it can be removed after another X releases or Y years (whichever is greater).<br> </div> Tue, 08 Mar 2011 09:40:51 +0000 debugfs: rules not welcome https://lwn.net/Articles/431377/ https://lwn.net/Articles/431377/ foom <div class="FormattedComment"> Hah, I missed that sentence the first time I read the article. But that's indeed quite hilarious that "breaking tools" is a reason given to not want to move the files from a location that's supposedly "anything goes" with no ABI compatibility rules. :)<br> </div> Sat, 05 Mar 2011 01:35:18 +0000 debugfs: rules not welcome https://lwn.net/Articles/430957/ https://lwn.net/Articles/430957/ mikachu <div class="FormattedComment"> "Moving interfaces requires possibly cleaning them up, making a stronger commitment to ABI compatibility going forward and, importantly, breaking tools which depend on the current location of those interfaces."<br> <p> There is something incredibly oxymoronic about not wanting to move an interface for fear of breaking ABI compatibility for fear of not being able to break ABI compatilibity.<br> </div> Thu, 03 Mar 2011 15:53:32 +0000 Developers versus administrators https://lwn.net/Articles/430080/ https://lwn.net/Articles/430080/ epa <blockquote>but if those things become useful to others, they should be "productized".</blockquote>But that's not the same thing as 'maintained with an unchanging interface for ever after'. <p> It might be a useful thing to see how many times the frobfs code calls frob_inode(). Essential, even, for performance tuning on large systems. But the frobfs developers want to have freedom to change their code to get rid of the frob_inode() call without breaking backwards compatibility. So there must be a way to label this stuff as usable in production, but not guaranteed to be there in future kernel versions. <p> In general any kind of instrumentation that works based on the kernel's internal data structures or control flow is useful to see but not a part of its API. Mon, 28 Feb 2011 17:04:59 +0000 Developers versus administrators https://lwn.net/Articles/429958/ https://lwn.net/Articles/429958/ foom <div class="FormattedComment"> Yeah, but....if something is useful and enabled on production systems, people will start depending on it. And then tools will start depending on it. And then you can't break it, and so diagfs becomes *yet another* place to look for the knob you want to check/tweak, just like you already have to look for it in both sysfs and procfs...<br> </div> Sat, 26 Feb 2011 03:01:46 +0000 debugfs: rules not welcome https://lwn.net/Articles/429909/ https://lwn.net/Articles/429909/ dmk <div class="FormattedComment"> what about selecting at runtime (perhaps needing to remount) what entries are actually populating the debugfs..<br> <p> something like <br> # echo "enable" &gt; /sys/kernel/debugfs/entries/perf<br> # echo "disable" &gt; /sys/kernel/debugfs/entries/buggy_subsys<br> # mount -o remount /debugfs<br> <p> ?<br> <p> </div> Fri, 25 Feb 2011 19:30:22 +0000 Developers versus administrators https://lwn.net/Articles/429847/ https://lwn.net/Articles/429847/ misiu_mp <div class="FormattedComment"> Isn't it a good idea to make the really useful stuff part of the kernel api and maintain it for backwards compatibility? This could only strengthen the system. <br> I understand if features in debugfs are made by the kernel hackers themselves for their own benefit, but if those things become useful to others, they should be "productized".<br> After all if debugfs is used today with no warranties of compatibility, then whatever uses is will be a burden to maintain and will make the useful stuff <br> just a niche. Making the useful stuff a solid part of the kernel could open for new possibilities. <br> <p> I would like to see some examples of <br> "things which are useful and safe to enable on production systems to fix whatever problems come up today, but need not become supported interfaces to preserve forever".<br> <p> </div> Fri, 25 Feb 2011 09:44:05 +0000 Developers versus administrators https://lwn.net/Articles/429834/ https://lwn.net/Articles/429834/ epa <div class="FormattedComment"> The trouble is that once you put something into sysfs or procfs, it becomes part of the kernel interface and you must commit to backwards compatibility. For that reason a lot of useful stuff goes into debugfs instead. But there are many things which are useful and safe to enable on production systems to fix whatever problems come up today, but need not become supported interfaces to preserve forever. Hence the need for an intermediate category between 'supported kernel feature' and 'no rules at all, never use on production systems'.<br> </div> Fri, 25 Feb 2011 07:56:39 +0000 Developers versus administrators https://lwn.net/Articles/429811/ https://lwn.net/Articles/429811/ giraffedata <blockquote> It needs to split into a pure 'debugfs' (which contains stuff of interest to kernel developers only, has no rules, and should never be mounted on production systems) and a new 'diagfs' for things which might be of interest to system administrators. </blockquote> <p> Isn't the latter what sysfs and procfs are for? Fri, 25 Feb 2011 00:49:38 +0000 debugfs: rules not welcome https://lwn.net/Articles/429806/ https://lwn.net/Articles/429806/ keybuk <div class="FormattedComment"> Note that kees has patched Ubuntu to make debugfs root-only anyway:<br> <p> <a href="https://launchpad.net/ubuntu/+source/mountall/2.22">https://launchpad.net/ubuntu/+source/mountall/2.22</a><br> </div> Fri, 25 Feb 2011 00:01:29 +0000 Developers versus administrators https://lwn.net/Articles/429727/ https://lwn.net/Articles/429727/ epa <div class="FormattedComment"> It needs to split into a pure 'debugfs' (which contains stuff of interest to kernel developers only, has no rules, and should never be mounted on production systems) and a new 'diagfs' for things which might be of interest to system administrators.<br> </div> Thu, 24 Feb 2011 16:39:55 +0000 debugfs: rules not welcome https://lwn.net/Articles/429652/ https://lwn.net/Articles/429652/ johill <div class="FormattedComment"> Doesn't debugfs still cause crashes if there are ever files that can disappear from it, because it doesn't have proper lifetime management? Or did that get fixed eventually and I just missed it?<br> <p> The case I'm thinking of is basically<br> <p> fd = open(debugfs/file)<br> &lt;wait, while doing something that causes that file to disappear, like unplugging HW&gt;<br> read(fd) / write(fd) [depending on your access]<br> <p> </div> Thu, 24 Feb 2011 08:50:12 +0000 debugfs: rules not welcome https://lwn.net/Articles/429641/ https://lwn.net/Articles/429641/ ajb <div class="FormattedComment"> Perhaps the production-ready status needs to be pushed down to the granularity of individual debugfs files. Eg, add a flag to the API calls which create debugfs files, and a 'production mode' in debugfs, under which files without the flag set do not get made available (except perhaps to root).<br> </div> Thu, 24 Feb 2011 08:10:48 +0000