]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: compaction: abort compaction loop if lock is contended or run too long
authorShaohua Li <shli@kernel.org>
Thu, 13 Sep 2012 01:00:59 +0000 (11:00 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 18 Sep 2012 06:04:31 +0000 (16:04 +1000)
commitf587083c389efd6ebe4a167053956b39f376782f
treecd0f661656841e3b01d558816f90b0ca726a4838
parent89f162bce97069bac5783df83d3d54316f722629
mm: compaction: abort compaction loop if lock is contended or run too long

isolate_migratepages_range() might isolate no pages, for example, when
zone->lru_lock is contended and compaction is async.  In this case, we
should abort compaction, otherwise, compact_zone will run a useless loop
and make zone->lru_lock is even contended.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Shaohua Li <shli@fusionio.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c
mm/internal.h