Maybe we should treat this stuff like architecture ABIs that
have a "small data" section?
Before elaborating, let me state that if we are going to use this
for things like disk stats and per-interface ipv6 ICMP stats, a
fixed size pool is absolutely unacceptable. People are configuring up
thousands upon thousands of VLAN net devices today, and if IPV6 is
enabled each of those will get a per-cpu ICMP stats block allocated.
And as Andrew said, there can be thousands of block devices.
Therefore, for these per-cpu applications there must be no limits built
into the mechanism.
Now, what I propose is that kmalloc_percpu() keeps it's current
implementation. Then we have a kmalloc_percpu_small() that must only
be invoked during module init and we limit the size to some reasonable
amount. This kmalloc_percpu_small() uses the 32K pool or whatever, as
does DECLARE_PERCPU in a module.
How about this?
-- David S. Miller <davem@redhat.com> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/