diff options
Diffstat (limited to 'mm/compaction.c')
-rw-r--r-- | mm/compaction.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index 9e1b9acb116b..952dc2fb24e5 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -842,13 +842,15 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, | |||
842 | 842 | ||
843 | /* | 843 | /* |
844 | * Periodically drop the lock (if held) regardless of its | 844 | * Periodically drop the lock (if held) regardless of its |
845 | * contention, to give chance to IRQs. Abort async compaction | 845 | * contention, to give chance to IRQs. Abort completely if |
846 | * if contended. | 846 | * a fatal signal is pending. |
847 | */ | 847 | */ |
848 | if (!(low_pfn % SWAP_CLUSTER_MAX) | 848 | if (!(low_pfn % SWAP_CLUSTER_MAX) |
849 | && compact_unlock_should_abort(&pgdat->lru_lock, | 849 | && compact_unlock_should_abort(&pgdat->lru_lock, |
850 | flags, &locked, cc)) | 850 | flags, &locked, cc)) { |
851 | break; | 851 | low_pfn = 0; |
852 | goto fatal_pending; | ||
853 | } | ||
852 | 854 | ||
853 | if (!pfn_valid_within(low_pfn)) | 855 | if (!pfn_valid_within(low_pfn)) |
854 | goto isolate_fail; | 856 | goto isolate_fail; |
@@ -1060,6 +1062,7 @@ isolate_abort: | |||
1060 | trace_mm_compaction_isolate_migratepages(start_pfn, low_pfn, | 1062 | trace_mm_compaction_isolate_migratepages(start_pfn, low_pfn, |
1061 | nr_scanned, nr_isolated); | 1063 | nr_scanned, nr_isolated); |
1062 | 1064 | ||
1065 | fatal_pending: | ||
1063 | cc->total_migrate_scanned += nr_scanned; | 1066 | cc->total_migrate_scanned += nr_scanned; |
1064 | if (nr_isolated) | 1067 | if (nr_isolated) |
1065 | count_compact_events(COMPACTISOLATED, nr_isolated); | 1068 | count_compact_events(COMPACTISOLATED, nr_isolated); |