]> git.baikalelectronics.ru Git - kernel.git/commit
mm/compaction: do not call suitable_migration_target() on every page
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>
Mon, 7 Apr 2014 22:37:04 +0000 (15:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 7 Apr 2014 23:35:51 +0000 (16:35 -0700)
commit905e4023a977dec105bea3f29d562df9882d21d2
treeeabccdd2c4f1b399ab04e0cc4ed8acff9f2d0281
parent136646723e29ab1afa94c303f893552d0c5eb526
mm/compaction: do not call suitable_migration_target() on every page

suitable_migration_target() checks that pageblock is suitable for
migration target.  In isolate_freepages_block(), it is called on every
page and this is inefficient.  So make it called once per pageblock.

suitable_migration_target() also checks if page is highorder or not, but
it's criteria for highorder is pageblock order.  So calling it once
within pageblock range has no problem.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/compaction.c