]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
pidns: make pid->level and pid_ns->level unsigned
authorPavel Emelyanov <xemul@openvz.org>
Wed, 30 Apr 2008 07:54:31 +0000 (00:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:49 +0000 (08:29 -0700)
commitcaafa4324335aeb11bc233d5f87aca8cce30beba
treeb6371b0c084ffb91f7304a7e392b28ccfdab8a2e
parentab883af53ec1b87add43b32a28d8347f17d5155b
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>
include/linux/pid.h
include/linux/pid_namespace.h
kernel/pid_namespace.c