Jump to content

Kernfs (Linux): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎top: Disambiguated a bit so it doesn't "clash" with virtual file systems, and "pseudo file system" is also used in referenced sources
→‎top: Refers to multiple functions
Line 3: Line 3:
{{Use mdy dates|date=August 2014}}
{{Use mdy dates|date=August 2014}}


In the [[Linux kernel]], '''kernfs''' is a set of [[Function (programming)|functions]] that contains the functionality required for creating [[pseudo file system]]s used internally by various [[Kernel (computer science)|kernel]] subsystems. The creation of kernfs resulted from splitting off part of the internal logic used by [[sysfs]], which provides a set of [[virtual file]]s by exporting information about hardware devices and associated [[device driver]]s from the kernel's device model to [[user space]], into an independent and reusable functionality so other kernel subsystems can implement their own pseudo [[file system]]s more easily and consistently.<ref name="kernel.org">{{cite web
In the [[Linux kernel]], '''kernfs''' is a set of [[Function (programming)|functions]] that the functionality required for creating [[pseudo file system]]s used internally by various [[Kernel (computer science)|kernel]] subsystems. The creation of kernfs resulted from splitting off part of the internal logic used by [[sysfs]], which provides a set of [[virtual file]]s by exporting information about hardware devices and associated [[device driver]]s from the kernel's device model to [[user space]], into an independent and reusable functionality so other kernel subsystems can implement their own pseudo [[file system]]s more easily and consistently.<ref name="kernel.org">{{cite web
| url = https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b8441ed279bff09a0a5ddeacf8f4087d2fb424ca
| url = https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b8441ed279bff09a0a5ddeacf8f4087d2fb424ca
| title = Linux kernel source tree: kernel/git/torvalds/linux.git: sysfs, kernfs: add skeletons for kernfs
| title = Linux kernel source tree: kernel/git/torvalds/linux.git: sysfs, kernfs: add skeletons for kernfs

Revision as of 14:09, 5 July 2016

In the Linux kernel, kernfs is a set of functions that contain the functionality required for creating pseudo file systems used internally by various kernel subsystems. The creation of kernfs resulted from splitting off part of the internal logic used by sysfs, which provides a set of virtual files by exporting information about hardware devices and associated device drivers from the kernel's device model to user space, into an independent and reusable functionality so other kernel subsystems can implement their own pseudo file systems more easily and consistently.[1][2][3]

The associated patchset, with Tejun Heo as its main author, was merged into the Linux kernel mainline in kernel version 3.14, which was released on March 30, 2014.[1][4] One of the primary users of kernfs is the pseudo file system used internally by cgroups, whose redesign continued into version 3.15 of the Linux kernel.[5]

See also

  • procfs – a special file system in Unix-like operating systems that presents information about processes and other system information
  • tmpfs – a common name for a temporary file storage facility on many Unix-like operating systems

References

  1. ^ a b Tejun Heo (October 13, 2013). "Linux kernel source tree: kernel/git/torvalds/linux.git: sysfs, kernfs: add skeletons for kernfs". kernel.org. Retrieved April 2, 2014.
  2. ^ Michael Larabel (January 20, 2014). "Linux kernel's sysfs logic turns into "kernfs" for 3.14". Phoronix. Retrieved April 2, 2014.
  3. ^ Tejun Heo (October 24, 2013). "sysfs: separate out kernfs, part #1". LWN.net. Retrieved July 25, 2014.
  4. ^ "Linux kernel 3.14, Section 3. Core". kernelnewbies.org. March 30, 2014. Retrieved July 25, 2014.
  5. ^ Tejun Heo (February 11, 2014). "Linux kernel source tree: kernel/git/torvalds/linux.git: cgroups: convert to kernfs". kernel.org. Retrieved May 23, 2014.
  • Source code, fs/kernfs in the Linux kernel source tree