]> git.kernelconcepts.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>
Thu, 13 Sep 2012 07:28:02 +0000 (17:28 +1000)
commit294f71c6c10831e78080412d507fb48c927fbda3
tree68978a53b50f0d4ef11236fda0ab5a172b57ec8b
parentc148e1c036ad630e27cb70a63d53cd1051101b75
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