diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-02-14 03:34:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-14 11:10:00 -0500 |
commit | 77b14db502cb85a031fe8fde6c85d52f3e0acb63 (patch) | |
tree | 4201f6a4dfe1062d1dc00659c403d630401b87cc /init/main.c | |
parent | 1ff007eb8e8c7c44e9a384a67d0fdd0fd06ba811 (diff) |
[PATCH] sysctl: reimplement the sysctl proc support
With this change the sysctl inodes can be cached and nothing needs to be done
when removing a sysctl table.
For a cost of 2K code we will save about 4K of static tables (when we remove
de from ctl_table) and 70K in proc_dir_entries that we will not allocate, or
about half that on a 32bit arch.
The speed feels about the same, even though we can now cache the sysctl
dentries :(
We get the core advantage that we don't need to have a 1 to 1 mapping between
ctl table entries and proc files. Making it possible to have /proc/sys vary
depending on the namespace you are in. The currently merged namespaces don't
have an issue here but the network namespace under /proc/sys/net needs to have
different directories depending on which network adapters are visible. By
simply being a cache different directories being visible depending on who you
are is trivial to implement.
[akpm@osdl.org: fix uninitialised var]
[akpm@osdl.org: fix ARM build]
[bunk@stusta.de: make things static]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/init/main.c b/init/main.c index a20a5138211f..649ab5443d43 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -86,7 +86,6 @@ extern void init_IRQ(void); | |||
86 | extern void fork_init(unsigned long); | 86 | extern void fork_init(unsigned long); |
87 | extern void mca_init(void); | 87 | extern void mca_init(void); |
88 | extern void sbus_init(void); | 88 | extern void sbus_init(void); |
89 | extern void sysctl_init(void); | ||
90 | extern void signals_init(void); | 89 | extern void signals_init(void); |
91 | extern void pidhash_init(void); | 90 | extern void pidhash_init(void); |
92 | extern void pidmap_init(void); | 91 | extern void pidmap_init(void); |
@@ -702,9 +701,6 @@ static void __init do_basic_setup(void) | |||
702 | usermodehelper_init(); | 701 | usermodehelper_init(); |
703 | driver_init(); | 702 | driver_init(); |
704 | 703 | ||
705 | #ifdef CONFIG_SYSCTL | ||
706 | sysctl_init(); | ||
707 | #endif | ||
708 | #ifdef CONFIG_PROC_FS | 704 | #ifdef CONFIG_PROC_FS |
709 | init_irq_proc(); | 705 | init_irq_proc(); |
710 | #endif | 706 | #endif |