]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: add & use zone_end_pfn() and zone_spans_pfn()
authorCody P Schafer <cody@linux.vnet.ibm.com>
Thu, 7 Feb 2013 01:27:05 +0000 (12:27 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:50 +0000 (16:46 +1100)
commit74ae5a6d8425537e4382a8f47cf3261ca73579ff
treedf65b09bcd31300125b4d4206d865226e877545b
parent91afd307f17186a9edebbc4d226d42863543eca8
mm: add & use zone_end_pfn() and zone_spans_pfn()

Add 2 helpers (zone_end_pfn() and zone_spans_pfn()) to reduce code
duplication.

This also switches to using them in compaction (where an additional
variable needed to be renamed), page_alloc, vmstat, memory_hotplug, and
kmemleak.

Note that in compaction.c I avoid calling zone_end_pfn() repeatedly because I
expect at some point the sycronization issues with start_pfn & spanned_pages
will need fixing, either by actually using the seqlock or clever memory barrier
usage.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: David Hansen <dave@linux.vnet.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mmzone.h
mm/compaction.c
mm/kmemleak.c
mm/memory_hotplug.c
mm/page_alloc.c
mm/vmstat.c