Re: [patch] SLQB v2

From: Nick Piggin
Date: Thu May 01 2008 - 21:49:18 EST


On Thu, May 01, 2008 at 06:28:57PM -0700, Christoph Lameter wrote:
> On Fri, 2 May 2008, Nick Piggin wrote:
>
> > But overloading struct page values happens in other places too. Putting
> > everything into struct page is not scalable. We could also make kmalloc
>
> Well lets at least attempt to catch the biggest users.

You want to also put slab and slob in there? What about page allocator?
It is ridiculous for the sake of "being easy to inspect with debuggers".
How hard is (struct slub_page *) to type?

Here is a real benefit you get with clearly defined types for struct
page: type checking.


> Also makes code
> clearer if you f.e. use page->first_page instead of page->private for
> compound pages.

compound_page_head() is fine too.


> kmalloc is intended to return an arbitrary type. struct page has a defined
> format that needs to be respected.

So does kmalloc if you take the union of all types it might possibly
be used as.
--
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/