Re: [patch] SLQB v2

From: Nick Piggin
Date: Thu May 01 2008 - 21:23:37 EST


On Thu, May 01, 2008 at 06:14:52PM -0700, Christoph Lameter wrote:
> On Fri, 2 May 2008, Nick Piggin wrote:
>
> > If you are not debugging sl?b.c code/pages, then why would you want to see
> > what those fields are?
>
> Because you are f.e. inspecting a core dump and want to see why certain
> fields have certain values to verify that the structures were not
> overwrittten or corrupted etc.

But overloading struct page values happens in other places too. Putting
everything into struct page is not scalable. We could also make kmalloc
return not a void pointer put a pointer to a union of every possible
structure that kmalloc may ever be used for, just in case we have to
inspect some data structure that could have been overwritten by something
else ;)

But seriously... you can always cast a page to a slub_page to see if it is
unexpectedly a slub page.
--
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/