OpenVZ Forum


Home » Mailing lists » Devel » Re: [RFC][PATCH 1/2] add user namespace [try #2]
Re: [RFC][PATCH 1/2] add user namespace [try #2] [message #16538] Mon, 28 August 2006 15:09 Go to next message
Dave Hansen is currently offline  Dave Hansen
Messages: 240
Registered: October 2005
Senior Member
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
Re: [RFC][PATCH 1/2] add user namespace [try #2] [message #16546 is a reply to message #16538] Mon, 28 August 2006 15:32 Go to previous message
Cedric Le Goater is currently offline  Cedric Le Goater
Messages: 443
Registered: February 2006
Senior Member
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
Previous Topic: [RFC][PATCH 2/2] add the user namespace to the unshare syscall [try #2]
Next Topic: Re: [RFC][PATCH 1/2] add user namespace [try #2]
Goto Forum:
  


Current Time: Mon Oct 07 11:10:24 GMT 2024

Total time taken to generate the page: 0.05142 seconds