diff options
author | Alexey Dobriyan | 2022-09-20 20:35:23 +0300 |
---|---|---|
committer | Andrew Morton | 2022-10-03 14:21:45 -0700 |
commit | ef1d61781bc6708ccc4a21262cc80a7dad952e04 (patch) | |
tree | 8718e18c0d48dcd197f78ab1924ac7d21cab0ac5 /fs/proc/loadavg.c | |
parent | da6f79164e98de4ab3f2fdeea4875207fe282014 (diff) |
proc: mark more files as permanent
Mark
/proc/devices
/proc/kpagecount
/proc/kpageflags
/proc/kpagecgroup
/proc/loadavg
/proc/meminfo
/proc/softirqs
/proc/uptime
/proc/version
as permanent /proc entries, saving alloc/free and some list/spinlock ops
per use.
These files are never removed by the kernel so it is OK to mark them.
Link: https://lkml.kernel.org/r/Yyn527DzDMa+r0Yj@localhost.localdomain
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/proc/loadavg.c')
-rw-r--r-- | fs/proc/loadavg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/proc/loadavg.c b/fs/proc/loadavg.c index f32878d9a39f..817981e57223 100644 --- a/fs/proc/loadavg.c +++ b/fs/proc/loadavg.c @@ -9,6 +9,7 @@ #include <linux/seq_file.h> #include <linux/seqlock.h> #include <linux/time.h> +#include "internal.h" static int loadavg_proc_show(struct seq_file *m, void *v) { @@ -27,7 +28,10 @@ static int loadavg_proc_show(struct seq_file *m, void *v) static int __init proc_loadavg_init(void) { - proc_create_single("loadavg", 0, NULL, loadavg_proc_show); + struct proc_dir_entry *pde; + + pde = proc_create_single("loadavg", 0, NULL, loadavg_proc_show); + pde_make_permanent(pde); return 0; } fs_initcall(proc_loadavg_init); |