aboutsummaryrefslogtreecommitdiffstats
path: root/mm/internal.h
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2008-07-24 00:26:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:13 -0400
commit708614e6180f398cd307ea0048d48ba6fa274610 (patch)
tree8fedf22cf9a2f404e2aef10c5b3858b99880c4c2 /mm/internal.h
parent6b74ab97bc12ce74acec900f1d89a4aee2e4d70d (diff)
mm: verify the page links and memory model
Print out information on how the page flags are being used if mminit_loglevel is MMINIT_VERIFY or higher and unconditionally performs sanity checks on the flags regardless of loglevel. When the page flags are updated with section, node and zone information, a check are made to ensure the values can be retrieved correctly. Finally we confirm that pfn_to_page and page_to_pfn are the correct inverse functions. [akpm@linux-foundation.org: fix printk warnings] 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>
Diffstat (limited to 'mm/internal.h')
-rw-r--r--mm/internal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h
index a7ee05253294..7a4a2885dc8e 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -78,6 +78,10 @@ do { \
78 } \ 78 } \
79} while (0) 79} while (0)
80 80
81extern void mminit_verify_pageflags_layout(void);
82extern void mminit_verify_page_links(struct page *page,
83 enum zone_type zone, unsigned long nid, unsigned long pfn);
84
81#else 85#else
82 86
83static inline void mminit_dprintk(enum mminit_level level, 87static inline void mminit_dprintk(enum mminit_level level,
@@ -85,5 +89,13 @@ static inline void mminit_dprintk(enum mminit_level level,
85{ 89{
86} 90}
87 91
92static inline void mminit_verify_pageflags_layout(void)
93{
94}
95
96static inline void mminit_verify_page_links(struct page *page,
97 enum zone_type zone, unsigned long nid, unsigned long pfn)
98{
99}
88#endif /* CONFIG_DEBUG_MEMORY_INIT */ 100#endif /* CONFIG_DEBUG_MEMORY_INIT */
89#endif 101#endif