]> Git Repo - linux.git/commit - mm/vmstat.c
mm: add & use zone_end_pfn() and zone_spans_pfn()
authorCody P Schafer <[email protected]>
Sat, 23 Feb 2013 00:35:23 +0000 (16:35 -0800)
committerLinus Torvalds <[email protected]>
Sun, 24 Feb 2013 01:50:20 +0000 (17:50 -0800)
commit108bcc96ef7047c02cad4d229f04da38186a3f3f
treee11d82074cae54dcf0fa8eea12750c661a16b02d
parent9127ab4ff92f0ecd7b4671efa9d0edb21c691e9f
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 <[email protected]>
Cc: David Hansen <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Mel Gorman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/mmzone.h
mm/compaction.c
mm/kmemleak.c
mm/memory_hotplug.c
mm/page_alloc.c
mm/vmstat.c
This page took 0.056083 seconds and 4 git commands to generate.