Re: [PATCH] kmalloc_percpu

Andrew Morton (akpm@digeo.com)
Mon, 5 May 2003 23:55:49 -0700


"David S. Miller" <davem@redhat.com> wrote:
>
> Your grep is faulty, we're using kmalloc_percpu() in ipv6 for per-cpu
> and per-device icmp stats.

My grep is fine. It's the brain which failed ;)

> You solution doesn't work in that case. Also ipv4 will have the same
> problems if we make that modular at some point.
>
> I also don't see how this fits in for your ext2 fuzzy counter stuff.

Well it doesn't fit. With the proposals which we are discussing here, ext2
(and, we hope, soon ext3) would continue to use foo[NR_CPUS].

> It isn't a "module" for most people, I can't even remember if I've
> ever built ext2 non-statically. :-) It almost appears as if you
> are suggesting kmalloc_percpu() is not usable at all.

kmalloc_per_cpu() is useful at present. But with Rusty's patch it becomes
less useful.

Aside: I rather think that 4000 filesystems isn't sane. 4000 disks is, but I
find it hard to believe that people will have a separate fs on each one...

> So there we have it, there are a total of 3 users of kmalloc_percpu()
> (ipv4/ipv6/diskstats) so let's decide if it's going to continue to
> live longer or not before there are any more. :-)

How about we leave kmalloc_per_cpu as-is (it uses kmalloc()), and only apply
Rusty's new code to DEFINE_PER_CPU?

-
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/