diff options
author | 2008-04-30 00:54:31 -0700 | |
---|---|---|
committer | 2008-04-30 08:29:49 -0700 | |
commit | caafa4324335aeb11bc233d5f87aca8cce30beba (patch) | |
tree | b6371b0c084ffb91f7304a7e392b28ccfdab8a2e /kernel | |
parent | make marker_debug static (diff) | |
download | linux-caafa4324335aeb11bc233d5f87aca8cce30beba.tar.gz linux-caafa4324335aeb11bc233d5f87aca8cce30beba.tar.bz2 linux-caafa4324335aeb11bc233d5f87aca8cce30beba.zip |
pidns: make pid->level and pid_ns->level unsigned
These values represent the nesting level of a namespace and pids living in it,
and it's always non-negative.
Turning this from int to unsigned int saves some space in pid.c (11 bytes on
x86 and 64 on ia64) by letting the compiler optimize the pid_nr_ns a bit.
E.g. on ia64 this removes the sign extension calls, which compiler adds to
optimize access to pid->nubers[ns->level].
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/pid_namespace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index 5ca37fa50beb..98702b4b8851 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c @@ -66,7 +66,7 @@ err_alloc: return NULL; } -static struct pid_namespace *create_pid_namespace(int level) +static struct pid_namespace *create_pid_namespace(unsigned int level) { struct pid_namespace *ns; int i; |