diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2011-01-12 20:00:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:18 -0500 |
commit | 6164281ab7a4d3bd42588d6b25984e960a2e032f (patch) | |
tree | ea4bf309efed7ec922431c6e5b5d659919eaf2ae /include/linux/user_namespace.h | |
parent | e020e742e5dbd8c44d31706995dc13ddc732e274 (diff) |
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>
Diffstat (limited to 'include/linux/user_namespace.h')
-rw-r--r-- | include/linux/user_namespace.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 8178156711f9..faf467944baf 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/err.h> | 7 | #include <linux/err.h> |
8 | 8 | ||
9 | #define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8) | 9 | #define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 7) |
10 | #define UIDHASH_SZ (1 << UIDHASH_BITS) | 10 | #define UIDHASH_SZ (1 << UIDHASH_BITS) |
11 | 11 | ||
12 | struct user_namespace { | 12 | struct user_namespace { |