On Tue, Jan 28, 2025 at 05:42:57PM -0500, Steven Rostedt wrote: ... > I believe kernfs is to cover control interfaces like sysfs and debugfs, > that actually changes kernel behavior when their files are written to. It's > also likely why procfs is such a mess because that too is a control > interface. Just for context, kernfs is factored out from sysfs. One of the factors which drove the design was memory overhead. On large systems (IIRC especially with iSCSI), there can be a huge number of sysfs nodes and allocating a dentry and inode pair for each file made some machines run out of memory during boot, so sysfs implemented memory-backed filesystem store which then made its interface to its users to depart from the VFS layer. This requirement holds for cgroup too - there are systems with a *lot* of cgroups and the associated interface files and we don't want to pin a dentry and inode for all of them. Thanks. -- tejun