Commit 97ee4ba7 authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds

mm: page_alloc: Make paranoid check in move_freepages a VM_BUG_ON

Since 2.6.24 there has been a paranoid check in move_freepages that looks
up the zone of two pages.  This is a very slow path and the only time I've
seen this bug trigger recently is when memory initialisation was broken
during patch development.  Despite the fact it's a slow path, this patch
converts the check to a VM_BUG_ON anyway as it has served its purpose by
now.
Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Acked-by: default avatarRik van Riel <riel@redhat.com>
Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b246d3d1
...@@ -1015,7 +1015,7 @@ int move_freepages(struct zone *zone, ...@@ -1015,7 +1015,7 @@ int move_freepages(struct zone *zone,
* Remove at a later date when no bug reports exist related to * Remove at a later date when no bug reports exist related to
* grouping pages by mobility * grouping pages by mobility
*/ */
BUG_ON(page_zone(start_page) != page_zone(end_page)); VM_BUG_ON(page_zone(start_page) != page_zone(end_page));
#endif #endif
for (page = start_page; page <= end_page;) { for (page = start_page; page <= end_page;) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment