Re: [Patch] Scale pidhash_shift/pidhash_size up based on num_possible_cpus().
- From: Robin Holt <holt@xxxxxxx>
- Date: Thu, 31 Jul 2008 15:08:35 -0500
Like so???
I have not tested this yet.
---
Set the upper limit for the pidhash_shift based upon PID_MAX_LIMIT.
Signed-off-by: Robin Holt <holt@xxxxxxx>
Index: contention_unroll/kernel/pid.c
===================================================================
--- contention_unroll.orig/kernel/pid.c 2008-07-31 11:59:21.154284073 -0500
+++ contention_unroll/kernel/pid.c 2008-07-31 15:07:21.909158788 -0500
@@ -504,7 +504,7 @@ void __init pidhash_init(void)
unsigned long megabytes = nr_kernel_pages >> (20 - PAGE_SHIFT);
pidhash_shift = max(4, fls(megabytes * 4));
- pidhash_shift = min(12, pidhash_shift);
+ pidhash_shift = min(fls(PID_MAX_LIMIT) - 6, pidhash_shift);
pidhash_size = 1 << pidhash_shift;
printk("PID hash table entries: %d (order: %d, %Zd bytes)\n",
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [Patch] Scale pidhash_shift/pidhash_size up based on num_possible_cpus().
- From: Robin Holt
- Re: [Patch] Scale pidhash_shift/pidhash_size up based on num_possible_cpus().
- From: Eric W. Biederman
- Re: [Patch] Scale pidhash_shift/pidhash_size up based on num_possible_cpus().
- From: Robin Holt
- Re: [Patch] Scale pidhash_shift/pidhash_size up based on num_possible_cpus().
- From: Eric W. Biederman
- [Patch] Scale pidhash_shift/pidhash_size up based on num_possible_cpus().
- Prev by Date: Re: linux-next: Tree for July 30
- Next by Date: Re: [PATCH 2/2] xen-netfront: call netif_start_queue() on xennet_open()
- Previous by thread: Re: [Patch] Scale pidhash_shift/pidhash_size up based on num_possible_cpus().
- Next by thread: [PATCH] drivers/usb/class/cdc-acm.c: Fix compile warnings
- Index(es):