diff options
author | Liav A <liavalb@gmail.com> | 2023-02-18 18:52:44 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-19 13:47:11 +0100 |
commit | 61f4914d6e8c07352c9f1223709fe82a8432d66e (patch) | |
tree | 777bdfe2c052ba2bd1438c8d8cf40c15a56d11b3 /Base/usr | |
parent | 52f156be010a9289511b7481c84367c543a06f9d (diff) | |
download | serenity-61f4914d6e8c07352c9f1223709fe82a8432d66e.zip |
Kernel+Userland: Add constants subdirectory at /sys/kernel directory
This subdirectory is meant to hold all constant data related to the
kernel. This means that this data is never meant to updated and is
relevant from system boot to system shutdown.
Move the inodes of "load_base", "cmdline" and "system_mode" to that
directory. All nodes under this new subdirectory are generated during
boot, and therefore don't require calling kmalloc each time we need to
read them. Locking is also not necessary, because these nodes and their
data are completely static once being generated.
Diffstat (limited to 'Base/usr')
-rw-r--r-- | Base/usr/share/man/man7/sys.md | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Base/usr/share/man/man7/sys.md b/Base/usr/share/man/man7/sys.md index c16d361734..18e6ac95b5 100644 --- a/Base/usr/share/man/man7/sys.md +++ b/Base/usr/share/man/man7/sys.md @@ -41,19 +41,16 @@ and other kernel-related data to userspace. #### `kernel` directory entries * **`processes`** - This node exports a list of all processes that currently exist. -* **`cmdline`** - This node exports the kernel boot commandline that was passed from the bootloader. * **`cpuinfo`** - This node exports information on the CPU. * **`df`** - This node exports information on mounted filesystems and basic statistics on them. * **`dmesg`** - This node exports information from the kernel log. * **`interrupts`** - This node exports information on all IRQ handlers and basic statistics on them. -* **`load_base`** - This node reveals the loading address of the kernel. * **`keymap`** - This node exports information on the currently used keymap. * **`memstat`** - This node exports statistics on memory allocation in the kernel. * **`profile`** - This node exports statistics on profiling data. * **`stats`** - This node exports statistics on scheduler timing data. -* **`system_mode`** - This node exports the chosen system mode as it was decided based on the kernel commandline or a default value. * **`uptime`** - This node exports the uptime data. * **`jails`** - This node exports information about existing jails (only if the current process is not in jail). * **`power_state`** - This node only responds to write requests on it. A written value of `1` results @@ -76,6 +73,16 @@ This subdirectory includes global settings of the kernel. * **`ubsan_is_deadly`** - This node controls the deadliness of the kernel undefined behavior sanitizer errors. +#### `constants` directory + +This subdirectory includes global constants of the kernel. +Those nodes are generated during the boot sequence and are completely static, +therefore making them very fast to read (no kmalloc or locking is needed). + +* **`load_base`** - This node reveals the loading address of the kernel. +* **`system_mode`** - This node exports the chosen system mode as it was decided based on the kernel commandline or a default value. +* **`cmdline`** - This node exports the kernel boot commandline that was passed from the bootloader. + ### Consistency and stability of data across multiple read operations When opening a data node, the kernel generates the required data so it's prepared |