mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
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>
This commit is contained in:
parent
e020e742e5
commit
6164281ab7
2 changed files with 13 additions and 4 deletions
|
|
@ -6,7 +6,7 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8)
|
||||
#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 7)
|
||||
#define UIDHASH_SZ (1 << UIDHASH_BITS)
|
||||
|
||||
struct user_namespace {
|
||||
|
|
|
|||
Loading…
Reference in a new issue