Kernfs (Linux)
   HOME

TheInfoList



OR:

In the
Linux kernel The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ...
, kernfs is a set of functions that contain the functionality required for creating the
pseudo file system In computer science, a synthetic file system or a pseudo file system is a hierarchical interface to non-file objects that appear as if they were regular files in the tree of a disk-based or long-term-storage file system. These non-file objects ...
s used internally by various
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learn ...
subsystems so that they may use
virtual file In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
s. For example, sysfs provides a set of virtual files by exporting information about hardware devices and associated
device driver In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabling operating systems and o ...
s from the kernel's device model to
user space A modern computer operating system usually segregates virtual memory into user space and kernel space. Primarily, this separation serves to provide memory protection and hardware protection from malicious or errant software behaviour. Kernel ...
. 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 The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU o ...
in kernel version 3.14, which was released on March 30, 2014. Kernfs took the independent and reusable functionality of sysfs so other kernel subsystems can implement their own pseudo
file system In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
s more easily and consistently. One of the primary users of kernfs is the pseudo file system used internally by
cgroups cgroups (abbreviated from control groups) is a Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes. Engineers at Google started the work on this ...
, whose redesign continued into version 3.15 of the Linux kernel.


See also

*
procfs The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, providing a more convenient and standardized meth ...
a pseudo file system in Unix-like operating systems that presents information about processes (and about some other system information) *
tmpfs tmpfs (short for Temporary File System) is a temporary file storage paradigm implemented in many Unix-like operating systems. It is intended to appear as a mounted file system, but data is stored in volatile memory instead of a persistent storage ...
a pseudo file system for temporary file storage on many Unix-like operating systems


References


External links


Source code
in the Linux kernel source tree {{Operating system Interfaces of the Linux kernel Linux kernel features