Re: [SLUB 2/3] Large kmalloc pass through. Removal of large general slabs

From: Matt Mackall
Date: Wed Mar 07 2007 - 13:18:17 EST


On Wed, Mar 07, 2007 at 07:34:38AM -0800, Christoph Lameter wrote:
> On Wed, 7 Mar 2007, Peter Zijlstra wrote:
>
> > > return -1;
> > > }
> >
> > Perhaps so something with PAGE_SIZE here, as you know there are
> > platforms/configs where PAGE_SIZE != 4k :-)
>
> Any allocation > 2k just uses a regular allocation which will waste space.
>
> I have a patch here to make this dependent on page size using a loop. The
> problem is that it does not work with some versions of gcc. On the
> other hand we really need this since one arch can
> actually have an order 22 page size!

You don't need a loop, you need an if (s >= PAGE_SIZE) at the head of
your static list.

--
Mathematics is the supreme nostalgia of our time.
-
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/