lkml.org 
[lkml]   [2003]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] kmalloc_percpu
Date
In message <20030505220250.213417f6.akpm@digeo.com> you write:
> "David S. Miller" <davem@redhat.com> wrote:
> >
> > I think you should BUG() if a module calls kmalloc_percpu() outside
> > of mod->init(), this is actually implementable.
> >
> > Andrew's example with some module doing kmalloc_percpu() inside
> > of fops->open() is just rediculious.
>
> crap. Modules deal with per-device and per-mount objects. If a module
> cannot use kmalloc_per_cpu on behalf of the primary object which it manages
> then the facility is simply not useful to modules.

No, the allocator is dog-slow. If you want to use it on open, you
need a new allocator, not one that does a linear search for blocks.

> A case in point, which Rusty has twice mentioned, is the three per-mount
> fuzzy counters in the ext2 superblock. And lo, ext2 cannot use the code in
> this patch, because people want to scale to 4000 mounts.

Well, 4000 will fit on 32-bit archs, easily. Yes, it's a limit.

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.039 / U:1.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site