Commit c4c62e94 authored by Matt Mackall's avatar Matt Mackall Committed by Linus Torvalds

[PATCH] base-small: shrink UID hash

CONFIG_BASE_SMALL reduce UID lookup hash
Signed-off-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7ad226a2
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
* UID task count cache, to get fast user lookup in "alloc_uid" * UID task count cache, to get fast user lookup in "alloc_uid"
* when changing user ID's (ie setuid() and friends). * when changing user ID's (ie setuid() and friends).
*/ */
#define UIDHASH_BITS 8
#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8)
#define UIDHASH_SZ (1 << UIDHASH_BITS) #define UIDHASH_SZ (1 << UIDHASH_BITS)
#define UIDHASH_MASK (UIDHASH_SZ - 1) #define UIDHASH_MASK (UIDHASH_SZ - 1)
#define __uidhashfn(uid) (((uid >> UIDHASH_BITS) + uid) & UIDHASH_MASK) #define __uidhashfn(uid) (((uid >> UIDHASH_BITS) + uid) & UIDHASH_MASK)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment