Re: [PATCH 4/4] kstat: modify kstat_irqs_legacy to be variable sized

From: Mike Travis
Date: Sat Jan 10 2009 - 23:32:31 EST


Ingo Molnar wrote:
> * Mike Travis <travis@xxxxxxx> wrote:
...
>>>> Allocate kstat_irqs_legacy based on nr_cpu_ids to deal with this
>>>> memory usage bump when NR_CPUS bumped from 128 to 4096:
>>>>
>>>> 8192 +253952 262144 +3100% kstat_irqs_legacy(.bss)
>>>>
...
>>>> + /* allocate based on nr_cpu_ids */
>>>> + kstat_irqs_legacy = alloc_bootmem(NR_IRQS_LEGACY * nr_cpu_ids *
>>>> + sizeof(int));
...
>>> btw., while at it - dont we want to upgrade this to a 'long' (in a
>>> separate commit)? Having more than 4 billion irqs after bootup is easily
>>> possible.

Looking at this more closely, it seems it would be better to per_cpu_alloc
the legacy kstat_irqs as that would place the value being incremented on the
node of the cpu doing the incrementing.

This, of course, would need the early per_cpu_alloc (in bootmem) that
the new cpu_alloc changes from Christoph and Rusty is providing.

Thanks,
Mike
--
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/