Skip to content

Commit

Permalink
mm: meminit: remove mminit_verify_page_links
Browse files Browse the repository at this point in the history
mminit_verify_page_links() is an extremely paranoid check that was
introduced when memory initialisation was being heavily reworked.
Profiles indicated that up to 10% of parallel memory initialisation was
spent on checking this for every page.  The cost could be reduced but in
practice this check only found problems very early during the
initialisation rewrite and has found nothing since.  This patch removes an
expensive unnecessary check.

Signed-off-by: Mel Gorman <[email protected]>
Tested-by: Nate Zimmer <[email protected]>
Tested-by: Waiman Long <[email protected]>
Tested-by: Daniel J Blueman <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Robin Holt <[email protected]>
Cc: Nate Zimmer <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Scott Norton <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Mel Gorman authored and torvalds committed Jul 1, 2015
1 parent ac5d253 commit 74033a7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
8 changes: 0 additions & 8 deletions mm/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,7 @@ 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);
extern void mminit_verify_zonelist(void);

#else

static inline void mminit_dprintk(enum mminit_level level,
Expand All @@ -377,11 +374,6 @@ 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)
{
}

static inline void mminit_verify_zonelist(void)
{
}
Expand Down
8 changes: 0 additions & 8 deletions mm/mm_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,6 @@ void __init mminit_verify_pageflags_layout(void)
BUG_ON(or_mask != add_mask);
}

void __meminit mminit_verify_page_links(struct page *page, enum zone_type zone,
unsigned long nid, unsigned long pfn)
{
BUG_ON(page_to_nid(page) != nid);
BUG_ON(page_zonenum(page) != zone);
BUG_ON(page_to_pfn(page) != pfn);
}

static __init int set_mminit_loglevel(char *str)
{
get_option(&str, &mminit_loglevel);
Expand Down
1 change: 0 additions & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@ static void __meminit __init_single_page(struct page *page, unsigned long pfn,
unsigned long zone, int nid)
{
set_page_links(page, zone, nid, pfn);
mminit_verify_page_links(page, zone, nid, pfn);
init_page_count(page);
page_mapcount_reset(page);
page_cpupid_reset_last(page);
Expand Down

0 comments on commit 74033a7

Please sign in to comment.