Re: [RFC/PATCH 2/2] mm, slob: Save real allocated size in page->private

Christoph Lameter
2012-08-14T14:56:54Z

On Tue, 14 Aug 2012, Ezequiel Garcia wrote:

> As documented in slob.c header, page->private field is used to return
> accurately the allocated size, through ksize().
> Therefore, if one allocates a contiguous set of pages the available size
> is PAGE_SIZE << order, instead of the requested size.

I would prefer if you would remove this strange feature from slob. The
ksize for a !PageSlab() "slab" page is always PAGE_SIZE << compound_order(page).
There is no need to use page->private here. It is a bad practice to not
mark a page as a slab page but then use fields for special purposes.