]> git.baikalelectronics.ru Git - kernel.git/commit
mm: make defensive checks around PFN values registered for memory usage
authorMel Gorman <mel@csn.ul.ie>
Thu, 24 Jul 2008 04:26:52 +0000 (21:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:13 +0000 (10:47 -0700)
commit955fd75031a216fdb3921a23e6c9820a2717b37d
tree507f06335dd1e66144f176e8e863743895e43d79
parent391c61ac6d3418f351404efae65c9d62301e9649
mm: make defensive checks around PFN values registered for memory usage

There are a number of different views to how much memory is currently active.
There is the arch-independent zone-sizing view, the bootmem allocator and
memory models view.

Architectures register this information at different times and is not
necessarily in sync particularly with respect to some SPARSEMEM limitations.

This patch introduces mminit_validate_memmodel_limits() which is able to
validate and correct PFN ranges with respect to the memory model.  It is only
SPARSEMEM that currently validates itself.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/bootmem.c
mm/internal.h
mm/page_alloc.c
mm/sparse.c