summaryrefslogtreecommitdiffstats
path: root/mm/internal.h
diff options
context:
space:
mode:
authorVlastimil Babka2014-10-10 00:27:07 +0200
committerLinus Torvalds2014-10-10 04:25:54 +0200
commitf8224aa5a0a4627926019bba7511926393fbee3b (patch)
treeca92929dcf6b8d84382a9e2ccbe3ed2eb7800b25 /mm/internal.h
parentmm, compaction: do not count compact_stall if all zones skipped compaction (diff)
downloadkernel-qcow2-linux-f8224aa5a0a4627926019bba7511926393fbee3b.tar.gz
kernel-qcow2-linux-f8224aa5a0a4627926019bba7511926393fbee3b.tar.xz
kernel-qcow2-linux-f8224aa5a0a4627926019bba7511926393fbee3b.zip
mm, compaction: do not recheck suitable_migration_target under lock
isolate_freepages_block() rechecks if the pageblock is suitable to be a target for migration after it has taken the zone->lock. However, the check has been optimized to occur only once per pageblock, and compact_checklock_irqsave() might be dropping and reacquiring lock, which means somebody else might have changed the pageblock's migratetype meanwhile. Furthermore, nothing prevents the migratetype to change right after isolate_freepages_block() has finished isolating. Given how imperfect this is, it's simpler to just rely on the check done in isolate_freepages() without lock, and not pretend that the recheck under lock guarantees anything. It is just a heuristic after all. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Acked-by: Minchan Kim <minchan@kernel.org> Acked-by: Mel Gorman <mgorman@suse.de> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Christoph Lameter <cl@linux.com> Cc: Rik van Riel <riel@redhat.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/internal.h')
0 files changed, 0 insertions, 0 deletions