]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm, compaction: terminate async compaction when rescheduling
authorDavid Rientjes <rientjes@google.com>
Thu, 22 May 2014 00:43:13 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:13 +0000 (10:43 +1000)
commita608a08baf0ad3ed8392a1ea655c277e415a4a5d
tree71ea487cce54f06d276b162e9225cfaa4303b21b
parentd6ca694a2f9cb508a2b872820b388799248e8133
mm, compaction: terminate async compaction when rescheduling

Async compaction terminates prematurely when need_resched(), see
compact_checklock_irqsave().  This can never trigger, however, if the
cond_resched() in isolate_migratepages_range() always takes care of the
scheduling.

If the cond_resched() actually triggers, then terminate this pageblock
scan for async compaction as well.

Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c