This is a note to let you know that I've just added the patch titled
mm, compaction: terminate async compaction when rescheduling
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mm-compaction-terminate-async-compaction-when-rescheduling.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From aeef4b83806f49a0c454b7d4578671b71045bee2 Mon Sep 17 00:00:00 2001
From: David Rientjes <[email protected]>
Date: Wed, 4 Jun 2014 16:08:31 -0700
Subject: mm, compaction: terminate async compaction when rescheduling
From: David Rientjes <[email protected]>
commit aeef4b83806f49a0c454b7d4578671b71045bee2 upstream.
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 <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Mel Gorman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
mm/compaction.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -494,8 +494,13 @@ isolate_migratepages_range(struct zone *
return 0;
}
+ if (cond_resched()) {
+ /* Async terminates prematurely on need_resched() */
+ if (cc->mode == MIGRATE_ASYNC)
+ return 0;
+ }
+
/* Time to isolate some pages for migration */
- cond_resched();
for (; low_pfn < end_pfn; low_pfn++) {
/* give a chance to irqs before checking need_resched() */
if (locked && !(low_pfn % SWAP_CLUSTER_MAX)) {
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/mm-compaction-terminate-async-compaction-when-rescheduling.patch
queue-3.14/mm-migration-add-destination-page-freeing-callback.patch
queue-3.14/mm-compaction-add-per-zone-migration-pfn-cache-for-async-compaction.patch
queue-3.14/mm-compaction-embed-migration-mode-in-compact_control.patch
queue-3.14/mm-compaction-return-failed-migration-target-pages-back-to-freelist.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html