summaryrefslogtreecommitdiff
path: root/mm/debug-pagealloc.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2014-08-28 22:34:23 +0400
committerJiri Slaby <jslaby@suse.cz>2014-09-26 13:51:52 +0400
commite961e1e65ada5c41c1f03280c9929bb8c5ac3651 (patch)
tree5253180c7b6cdc1537a5481e6dae89b1f48395de /mm/debug-pagealloc.c
parent0a0809a87b57b648be1dec3c311a5bfb34ea3b14 (diff)
downloadlinux-e961e1e65ada5c41c1f03280c9929bb8c5ac3651.tar.xz
mm: __rmqueue_fallback() should respect pageblock type
commit 0cbef29a782162a3896487901eca4550bfa397ef upstream. 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 47118af076f6 ("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 fef903efcf0c ("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> Signed-off-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'mm/debug-pagealloc.c')
0 files changed, 0 insertions, 0 deletions