linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] A config option to compile out some namespaces code (v3)
@ 2007-10-31 10:58 Pavel Emelyanov
  2007-10-31 11:05 ` [PATCH 1/5] The config option itself Pavel Emelyanov
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Pavel Emelyanov @ 2007-10-31 10:58 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Eric W. Biederman, Cedric Le Goater, Serge Hallyn,
	Linux Containers, Linux Kernel Mailing List

There were some questions like "do I need this on my cellphone"
in reply to different namespaces patches. Indeed, the namespaces
are not useful for most of the embedded systems, but the code
creating and releasing them weights a lot.

So I propose to add a config option which will help embedded
people to reduce the vmlinux size. This option simply compiles
out the namespaces cloning and releasing code *only*, but keeps
all the other logic untouched (e.g. the notion of init_ns).

When someone tries to clone some namespace with their support
turned off, he will receive an EINVAL error.

This patchset can save more than 2KB from the vmlinux when
turning the config option "NAMESPACES" to "n".

I do not introduce the NAMESPACES_EXPERIMENTAL config option, that
switches all the namespaces we consider experimental, but each 
namespace has its own config that can be mrked with "depends on
EXPERIMENTAL" on demand.

This is mainly done because some people consider pid namespaces broken
ant will probably want to make them depend on BROKEN. In this case
we'll have to introduce the NAMESPACES_BROKEN option which is not that
good.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [PATCH 0/5] A config option to compile out some namespaces code (v2)
@ 2007-10-01 15:31 Pavel Emelyanov
  2007-10-01 15:33 ` [PATCH 1/5] The config option itself Pavel Emelyanov
  0 siblings, 1 reply; 24+ messages in thread
From: Pavel Emelyanov @ 2007-10-01 15:31 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Cedric Le Goater, Serge Hallyn, Linux Kernel Mailing List, devel

Changes from v1:
* make the NAMESPACES_EXPERIMENTAL selectable even in !EMBEDDED case

There were some questions like "do I need this on my cellphone"
in reply to different namespaces patches. Indeed, the namespaces
are not useful for most of the embedded systems, but the code
creating and releasing them weights a lot.

So I propose to add a config option which will help embedded
people to reduce the vmlinux size. This option simply compiles
out the namespaces cloning and releasing code *only*, but keeps
all the other logic untouched (e.g. the notion of init_ns).

When someone tries to clone some namespace with their support
turned off, he will receive an EINVAL error.

This patchset can save more than 2KB from the vmlinux when
turning the config option "NAMESPACES" to "n":

$ scripts/bloat-o-meter vmlinux-no-ns vmlinux-with-ns 
add/remove: 27/0 grow/shrink: 11/7 up/down: 2477/-340 (2137)
function                                     old     new   delta
copy_pid_ns                                    -     537    +537
copy_user_ns                                   -     181    +181
copy_ipcs                                      -     149    +149
zap_pid_ns_processes                           -     130    +130
copy_utsname                                   -     120    +120
shm_exit_ns                                    -     106    +106
sem_exit_ns                                    -     106    +106
msg_exit_ns                                    -     106    +106
freeary                                        -     100    +100
release_uids                                   -      95     +95
freeque                                        -      92     +92
free_nsproxy                                  48     123     +75
create_new_namespaces                        300     358     +58
free_pid_ns                                    -      56     +56
pid_namespaces_init                            -      48     +48
__sem_init_ns                                  -      45     +45
shm_init_ns                                    -      42     +42
sem_init_ns                                    -      42     +42
msg_init_ns                                    -      42     +42
__shm_init_ns                                  -      38     +38
__msg_init_ns                                  -      31     +31
sysvipc_proc_release                           5      35     +30
proc_kill_sb                                   5      35     +30
free_ipc_ns                                    -      30     +30
do_shm_rmid                                    -      29     +29
proc_set_super                                13      38     +25
shm_release                                   18      39     +21
put_pid                                       75      95     +20
alloc_pid                                    687     706     +19
pid_caches_mutex                               -      16     +16
free_user_ns                                   -      16     +16
sysvipc_proc_open                            100     111     +11
do_shmat                                     778     787      +9
pid_caches_lh                                  -       8      +8
free_uts_ns                                    -       5      +5
pid_ns_cachep                                  -       4      +4
__initcall_pid_namespaces_init6                -       4      +4
do_exit                                     1855    1856      +1
show_stat                                   1665    1661      -4
sys_shmctl                                  1934    1907     -27
msg_init                                      82      47     -35
shm_init                                      92      47     -45
sem_init                                      99      44     -55
sys_msgctl                                  1394    1311     -83
sys_semctl                                  2123    2032     -91

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [PATCH 0/5] A config option to compile out some namespaces code
@ 2007-09-26 15:39 Pavel Emelyanov
  2007-09-26 15:43 ` [PATCH 1/5] The config option itself Pavel Emelyanov
  0 siblings, 1 reply; 24+ messages in thread
From: Pavel Emelyanov @ 2007-09-26 15:39 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Serge Hallyn, Cedric Le Goater, Eric W. Biederman,
	Linux Containers, Linux Kernel Mailing List

There were some questions like "do I need this on my cellphone"
in reply to different namespaces patches. Indeed, the namespaces
are not useful for most of the embedded systems, but the code
creating and releasing them weights a lot.

So I propose to add a config option which will help embedded
people to reduce the vmlinux size. This option simply compiles
out the namespaces cloning and releasing code *only*, but keeps
all the other logic untouched (e.g. the notion of init_ns).

When someone tries to clone some namespace with their support
turned off, he will receive an EINVAL error.

This patchset can save more than 2KB from the vmlinux when
turning the config option "NAMESPACES" to "n":

$ scripts/bloat-o-meter vmlinux-no-ns vmlinux-with-ns 
add/remove: 27/0 grow/shrink: 11/7 up/down: 2477/-340 (2137)
function                                     old     new   delta
copy_pid_ns                                    -     537    +537
copy_user_ns                                   -     181    +181
copy_ipcs                                      -     149    +149
zap_pid_ns_processes                           -     130    +130
copy_utsname                                   -     120    +120
shm_exit_ns                                    -     106    +106
sem_exit_ns                                    -     106    +106
msg_exit_ns                                    -     106    +106
freeary                                        -     100    +100
release_uids                                   -      95     +95
freeque                                        -      92     +92
free_nsproxy                                  48     123     +75
create_new_namespaces                        300     358     +58
free_pid_ns                                    -      56     +56
pid_namespaces_init                            -      48     +48
__sem_init_ns                                  -      45     +45
shm_init_ns                                    -      42     +42
sem_init_ns                                    -      42     +42
msg_init_ns                                    -      42     +42
__shm_init_ns                                  -      38     +38
__msg_init_ns                                  -      31     +31
sysvipc_proc_release                           5      35     +30
proc_kill_sb                                   5      35     +30
free_ipc_ns                                    -      30     +30
do_shm_rmid                                    -      29     +29
proc_set_super                                13      38     +25
shm_release                                   18      39     +21
put_pid                                       75      95     +20
alloc_pid                                    687     706     +19
pid_caches_mutex                               -      16     +16
free_user_ns                                   -      16     +16
sysvipc_proc_open                            100     111     +11
do_shmat                                     778     787      +9
pid_caches_lh                                  -       8      +8
free_uts_ns                                    -       5      +5
pid_ns_cachep                                  -       4      +4
__initcall_pid_namespaces_init6                -       4      +4
do_exit                                     1855    1856      +1
show_stat                                   1665    1661      -4
sys_shmctl                                  1934    1907     -27
msg_init                                      82      47     -35
shm_init                                      92      47     -45
sem_init                                      99      44     -55
sys_msgctl                                  1394    1311     -83
sys_semctl                                  2123    2032     -91

This set was reviewed and approved by Serge, Cedric and Eric.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2007-10-31 22:29 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31 10:58 [PATCH 0/5] A config option to compile out some namespaces code (v3) Pavel Emelyanov
2007-10-31 11:05 ` [PATCH 1/5] The config option itself Pavel Emelyanov
2007-10-31 16:19   ` Randy Dunlap
2007-10-31 17:34     ` Pavel Emelyanov
2007-10-31 22:29   ` Andrew Morton
2007-10-31 11:06 ` [PATCH 2/5] Move the UTS namespace under the option Pavel Emelyanov
2007-10-31 12:58   ` Cedric Le Goater
2007-10-31 14:04     ` Pavel Emelyanov
2007-10-31 11:08 ` [PATCH 3/5] Move the IPC " Pavel Emelyanov
2007-10-31 11:09 ` [PATCH 4/5] Move the user " Pavel Emelyanov
2007-10-31 11:11 ` [PATCH 5/5] Move the PID " Pavel Emelyanov
2007-10-31 12:53 ` [PATCH 0/5] A config option to compile out some namespaces code (v3) Cedric Le Goater
  -- strict thread matches above, loose matches on Subject: below --
2007-10-01 15:31 [PATCH 0/5] A config option to compile out some namespaces code (v2) Pavel Emelyanov
2007-10-01 15:33 ` [PATCH 1/5] The config option itself Pavel Emelyanov
2007-10-01 15:53   ` Serge E. Hallyn
2007-10-01 16:37   ` Randy Dunlap
2007-09-26 15:39 [PATCH 0/5] A config option to compile out some namespaces code Pavel Emelyanov
2007-09-26 15:43 ` [PATCH 1/5] The config option itself Pavel Emelyanov
2007-09-26 16:30   ` Randy Dunlap
2007-09-26 16:34   ` Serge E. Hallyn
2007-09-26 17:06     ` Serge E. Hallyn
2007-09-27  2:30       ` sukadev
2007-09-27  8:22         ` Pavel Emelyanov
2007-10-01 14:27           ` Serge E. Hallyn
2007-10-01 14:28             ` Pavel Emelyanov
2007-09-27 12:28   ` Cedric Le Goater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).