Re: [RFC][PATCH 1/2] add user namespace [try #2]
On Mon, 2006-08-28 at 16:56 +0200, Cedric Le Goater wrote: > > +#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8) How about an actual #ifdef here? Or, should we just do this one in Kconfig? -- Dave _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers
Dave Hansen wrote: > On Mon, 2006-08-28 at 16:56 +0200, Cedric Le Goater wrote: >> +#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8) > > How about an actual #ifdef here? yep. because i moved from a .c to .h and/or to improve readability ? > Or, should we just do this one in Kconfig? do you mean defining UIDHASH_BITS in KCONFIG ? We would need to that for other constant then and a fast grep gives me : include/asm-i386/mach-default/mach_mpspec.h:#if CONFIG_BASE_SMALL == 0 include/linux/threads.h:#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000) include/linux/threads.h:#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \ include/linux/user.h:#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8) include/linux/vt_kern.h:#define CON_BUF_SIZE (CONFIG_BASE_SMALL ? 256 : PAGE_SIZE) include/linux/autoconf.h:#define CONFIG_BASE_SMALL 0 include/config/auto.conf:CONFIG_BASE_SMALL=0 kernel/futex.c:#define FUTEX_HASHBITS (CONFIG_BASE_SMALL ? 4 : 8) kernel/timer.c:#define TVN_BITS (CONFIG_BASE_SMALL ? 4 : 6) kernel/timer.c:#define TVR_BITS (CONFIG_BASE_SMALL ? 6 : 8) lib/radix-tree.c:#define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6) we should probably keep it that way. thanks, C. _______________________________________________ Containers mailing list Containers@lists.osdl.org https://lists.osdl.org/mailman/listinfo/containers