]> 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>
Mon, 17 Sep 2012 10:46:03 +0000 (20:46 +1000)
commit4fcf71258617c8af8412f50f76aec67ca65e593f
tree17e82a2e9ff950adc1e86842d8e4f8b33f098654
parent5e7697ff27cfd91c0c2cecc72e1c846c655b442c
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