mm: __rmqueue_fallback() should respect pageblock type
When __rmqueue_fallback() doesn't find a free block with the required size it splits a larger page and puts the rest of the page onto the free list. But it has one serious mistake. When putting back, __rmqueue_fallback() always use start_migratetype if type is not CMA. However, __rmqueue_fallback() is only called when all of the start_migratetype queue is empty. That said, __rmqueue_fallback always puts back memory to the wrong queue except try_to_steal_freepages() changed pageblock type (i.e. requested size is smaller than half of page block). The end result is that the antifragmentation framework increases fragmenation instead of decreasing it. Mel's original anti fragmentation does the right thing. But commit 47118af0 ("mm: mmzone: MIGRATE_CMA migration type added") broke it. This patch restores sane and old behavior. It also removes an incorrect comment which was introduced by commit fef903ef ("mm/page_alloc.c: restructure free-page stealing code and fix a bug"). Signed-off-by:KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Michal Nazarewicz <mina86@mina86.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Loading
-
mentioned in commit f42e7a8d
-
mentioned in commit 55f1f0ba
-
mentioned in commit 60e4db26
-
mentioned in commit c7c6a8f1
-
mentioned in commit 195c11c1
-
mentioned in commit eed694c0
-
mentioned in commit 9d32d05b
-
mentioned in commit 895ac1ed
-
mentioned in commit 7b05004c
-
mentioned in commit b2892e8f
-
mentioned in commit ae5f0479
-
mentioned in commit 4f59acf4
-
mentioned in commit 2cbcf323
-
mentioned in commit 03e76a36
-
mentioned in commit f34a097c
-
mentioned in commit 17f81465
Please register or sign in to comment