📑 Table of Contents

In the Linux kernel, kernfs is a set of functions that contain the functionality required for creating the pseudo file systems used internally by various kernel subsystems so that they may use virtual files. For example, sysfs 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.

The creation of kernfs resulted from splitting off part of the internal logic used by sysfs. 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][2] Kernfs took the independent and reusable functionality of sysfs so other kernel subsystems can implement their own pseudo file systems more easily and consistently.[1][3][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

edit
  • procfs – a pseudo file system in Unix-like operating systems that presents information about processes (and about some other system information)
  • tmpfs – a pseudo file system for temporary file storage on many Unix-like operating systems

References

edit
  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. ^ "Linux kernel 3.14, Section 3. Core". kernelnewbies.org. March 30, 2014. Retrieved July 25, 2014.
  3. ^ Michael Larabel (January 20, 2014). "Linux kernel's sysfs logic turns into "kernfs" for 3.14". Phoronix. Retrieved April 2, 2014.
  4. ^ Tejun Heo (October 24, 2013). "sysfs: separate out kernfs, part #1". LWN.net. 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.
edit
  • Source code, fs/kernfs in the Linux kernel source tree

📚 Artikel Terkait di Wikipedia

Kernfs

kernfs may refer to: kernfs (BSD), a pseudo file system in BSD-based operating systems kernfs (Linux), a set of functions in the Linux kernel that aid

Systemd

adapted to support kernfs, and are being modified to support a unified hierarchy. Beside its primary purpose of providing a Linux init system, the systemd

Rust for Linux

Rust for Linux is an ongoing project started in 2020 to add Rust as a programming language that can be used within the Linux kernel software, which has

Cgroups

the kernel. Linux namespaces were inspired by the more general namespace functionality used heavily throughout Plan 9 from Bell Labs. Kernfs was introduced

List of file systems

PUFFS, FreeBSD kernel via a 3rd-party module, and Linux as a part of Linux procfs. kernfs – a file system found on some BSD systems (notably NetBSD) that provides

JFFS2

JFFS. JFFS2 has been included into the Linux kernel since September 23, 2001, when it was merged into the Linux kernel mainline as part of the kernel version

Device file

kernel space. Linux used to have a similar devfs implementation, but it was abandoned later, and then removed since version 2.6.17; Linux now primarily

Flash file system

JFFS, JFFS2 and YAFFS JFFS was the first flash-specific file system for Linux, but it was quickly superseded by JFFS2, originally developed for NOR flash