A number of bug reports have been submitted related to memory initialisation
commit66ada807e833f78345b57bb633c86fcdba1d4cb2
authorMel Gorman <mel@csn.ul.ie>
Fri, 25 Sep 2009 20:00:49 +0000 (25 22:00 +0200)
committerjames toy <toyj@union.edu>
Fri, 25 Sep 2009 20:00:49 +0000 (25 22:00 +0200)
tree69d687ca9ed90303ae7cbf89d20a674c7491cab5
parent7ef27d38b89d4ed4dd124b094f9c879d92ad1e98
A number of bug reports have been submitted related to memory initialisation
that would have been easier to debug if the PFN of page addresses were
available.  The dmesg output is often insufficient to find that information so
debugging patches need to be sent to the reporting user.

This patch prints out information on the memmap when it is being allocated and
the sizeof(struct page) when loglevel is set high enough.  In most
architectures, this output is produced in generic code.  x86_64 and ia64 both
setup node_mem_map in an architecture-specific manner requiring arch-specfic
changes.  Th memmap information can be used to translate any valid page
address into a PFN.  page_to_pfn() cannot be used directly in bad_page()
because there is no guarantee that the address pointer is valid in any way and
the translation can produce garbage.

Information on memmap is not printed out for the SPARSEMEM memory model.  This
only applies to FLATMEM and DISCONTIG configurations.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/ia64/mm/contig.c
arch/ia64/mm/discontig.c
mm/page_alloc.c