Index: linux-2.6/Documentation/kernel-parameters.txt =================================================================== --- linux-2.6.orig/Documentation/kernel-parameters.txt 2008-09-16 18:05:06.000000000 -0700 +++ linux-2.6/Documentation/kernel-parameters.txt 2008-09-16 18:10:42.000000000 -0700 @@ -1650,6 +1650,13 @@ and is between 256 and 4096 characters. may fail if this is set too low. Default is 8000 bytes. + percpu= Configure the number of percpu bytes that can be + dynamically allocated. This is used for per cpu + variables of modules and other dynamic per cpu data + structures. Creation of per cpu structures after boot + may fail if this is set too low. + Default is 8000 bytes. + pf. [PARIDE] See Documentation/paride.txt. Index: linux-2.6/mm/cpu_alloc.c =================================================================== --- linux-2.6.orig/mm/cpu_alloc.c 2008-09-16 18:10:28.000000000 -0700 +++ linux-2.6/mm/cpu_alloc.c 2008-09-16 18:10:42.000000000 -0700 @@ -123,6 +123,9 @@ void *cpu_alloc(unsigned long size, gfp_ ptr = __per_cpu_end + start; + printk(KERN_INFO "%d per cpu units allocated at offset %lx address %p", + units, start, ptr); + if (gfpflags & __GFP_ZERO) { int cpu; @@ -164,18 +167,20 @@ void cpu_free(void *start, unsigned long first_free = index; spin_unlock_irqrestore(&cpu_alloc_map_lock, flags); + printk(KERN_INFO "%d per cpu units freed.\n", units); } EXPORT_SYMBOL(cpu_free); int cpu_alloc_init(void) { + nr_units = percpu_reserve / UNIT_SIZE; cpu_alloc_map = alloc_bootmem(BITS_TO_LONGS(nr_units)); + printk(KERN_INFO "Per cpu allocator: %d bytes / %d allocation units.\n", + percpu_reserve, nr_units); return 0; } -early_initcall(cpu_alloc_init); -