Re: [PATCH] nommu: fix kobjsize() for SLOB and SLUB

From: Pekka Enberg
Date: Mon Jun 02 2008 - 02:32:58 EST


Hi Paul,

On Mon, Jun 2, 2008 at 8:59 AM, Paul Mundt <lethal@xxxxxxxxxxxx> wrote:
> In the kmem_cache_alloc() case calling ksize() there is bogus, the
> previous semantics for kobjsize() just defaulted to returning PAGE_SIZE
> for these, since page->index was typically 0. Presently if we ksize()
> those objects, we get bogus size results that are smaller than the
> minimum alignment size. So we still need a way to handle that, even if
> it's not frightfully accurate.
>
> If we go back and apply your PG_slab patch for SLUB + SLOB, then
> kobjsize() can just become:

What call-sites are using kmem_cache_alloc()? Can we convert them to
kmalloc() or page_alloc()? IIRC both Christoph and Matt opposed my
PG_slab patches.
--
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/