dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/fs/proc
Pavel Emelyanov 4665079cbb [NETNS]: Move some code into __init section when CONFIG_NET_NS=n
With the net namespaces many code leaved the __init section,
thus making the kernel occupy more memory than it did before.
Since we have a config option that prohibits the namespace
creation, the functions that initialize/finalize some netns
stuff are simply not needed and can be freed after the boot.

Currently, this is almost not noticeable, since few calls
are no longer in __init, but when the namespaces will be
merged it will be possible to free more code. I propose to
use the __net_init, __net_exit and __net_initdata "attributes"
for functions/variables that are not used if the CONFIG_NET_NS
is not set to save more space in memory.

The exiting functions cannot just reside in the __exit section,
as noticed by David, since the init section will have
references on it and the compilation will fail due to modpost
checks. These references can exist, since the init namespace
never dies and the exit callbacks are never called. So I
introduce the __exit_refok attribute just like it is already
done with the __init_refok.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:54:58 -07:00
..
Makefile [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
array.c sched: accounting regression since rc1 2007-08-23 15:18:02 +02:00
base.c Fix leaks on /proc/{*/sched,sched_debug,timer_list,timer_stats} 2007-07-31 15:39:40 -07:00
generic.c
inode-alloc.txt
inode.c Fix select on /proc files without ->poll 2007-09-11 17:21:20 -07:00
internal.h [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
kcore.c
kmsg.c
mmu.c
nommu.c
proc_devtree.c
proc_misc.c x86_64: Avoid too many remote cpu references due to /proc/stat 2007-07-21 18:37:09 -07:00
proc_net.c [NETNS]: Move some code into __init section when CONFIG_NET_NS=n 2007-10-10 16:54:58 -07:00
proc_sysctl.c
proc_tty.c
root.c [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
task_mmu.c
task_nommu.c
vmcore.c