]> git.baikalelectronics.ru Git - kernel.git/commit
user_ns: improve the user_ns on-the-slab packaging
authorPavel Emelyanov <xemul@parallels.com>
Thu, 13 Jan 2011 01:00:46 +0000 (17:00 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 16:03:18 +0000 (08:03 -0800)
commit3afc2f4ba37361a5ccb68137baba103f022aa71b
treeea4bf309efed7ec922431c6e5b5d659919eaf2ae
parent498796ca92e5060552e65b6dffe4d9e4f27298fc
user_ns: improve the user_ns on-the-slab packaging

Currently on 64-bit arch the user_namespace is 2096 and when being
kmalloc-ed it resides on a 4k slab wasting 2003 bytes.

If we allocate a separate cache for it and reduce the hash size from 128
to 64 chains the packaging becomes *much* better - the struct is 1072
bytes and the hole between is 98 bytes.

[akpm@linux-foundation.org: s/__initcall/module_init/]
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Serge E. Hallyn <serge@hallyn.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/user_namespace.h
kernel/user_namespace.c