[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>
This commit is contained in:
committed by
Linus Torvalds
parent
1ff007eb8e
commit
77b14db502
@@ -113,8 +113,6 @@ extern struct vfsmount *proc_mnt;
|
||||
extern int proc_fill_super(struct super_block *,void *,int);
|
||||
extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *);
|
||||
|
||||
extern int proc_match(int, const char *,struct proc_dir_entry *);
|
||||
|
||||
/*
|
||||
* These are generic /proc routines that use the internal
|
||||
* "struct proc_dir_entry" tree to traverse the filesystem.
|
||||
|
Reference in New Issue
Block a user