mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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. [[email protected]: fix printk warnings] Signed-off-by: Mel Gorman <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Andy Whitcroft <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6b74ab97bc
commit
708614e618
3 changed files with 91 additions and 0 deletions
|
|
@ -78,6 +78,10 @@ do { \
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
extern void mminit_verify_pageflags_layout(void);
|
||||
extern void mminit_verify_page_links(struct page *page,
|
||||
enum zone_type zone, unsigned long nid, unsigned long pfn);
|
||||
|
||||
#else
|
||||
|
||||
static inline void mminit_dprintk(enum mminit_level level,
|
||||
|
|
@ -85,5 +89,13 @@ static inline void mminit_dprintk(enum mminit_level level,
|
|||
{
|
||||
}
|
||||
|
||||
static inline void mminit_verify_pageflags_layout(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void mminit_verify_page_links(struct page *page,
|
||||
enum zone_type zone, unsigned long nid, unsigned long pfn)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_DEBUG_MEMORY_INIT */
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue