lkml.org 
[lkml]   [2008]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC/PATCH 1/3] SLAB: Add PageSlab checking to ksize()
From
Date

On Thu, 2008-05-22 at 07:43 +0300, Pekka Enberg wrote:
> Hi Paul,
>
> Paul Mundt wrote:
> > Shouldn't SLOB's PageSlab usage should mimic that of SLUB in this case
> > instead? PG_slab doesn't buy us much if we can already sort out the size
> > through compound_order(), it's the kmem_cache_alloc() and <= PAGE_SIZE
> > kmalloc()'s where __GFP_COMP isn't true and where PG_slab should be set.
>
> Well, we should really be calling ksize() in the nommu case and although
> Matt and Christoph don't seem to agree with me here, I'd much rather
> have *all* allocators set PageSlab for all the pages they return (yes,
> including pass-through ones) to get us back where we were with SLAB. We
> currently don't have any means to see whether an arbitrary page is part
> of the slab or not and I'd argue that's PageSlab is an established API
> (that makes sense).
>
> Furthermore, if ksize() in SLOB doesn't work for kmem_cache_alloc()
> pages, I think it should be fixed as well.

As I've said several times, ksize() on kmem_cache_alloced objects
-cannot work- on SLOB. Calling ksize() on something returned by
kmem_cache_alloc is a categorical error.

--
Mathematics is the supreme nostalgia of our time.



\
 
 \ /
  Last update: 2008-05-22 17:03    [W:0.093 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site