Hi Christoph, Thanks for your comments. On Tue, Aug 14, 2012 at 11:56 AM, Christoph Lameter <cl@xxxxxxxxx> wrote: > 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. > Mmm, I see. Sounds sensible. Fortunately I don't have to squeeze my brain thinking, since I have a nice example of this in slub's ksize(). if (unlikely(!PageSlab(page))) { WARN_ON(!PageCompound(page)); return PAGE_SIZE << compound_order(page); } I'll resend this patch alone with implementing something like it and removing page->private usage. Thanks again! Ezequiel. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>