diff options
Diffstat (limited to 'mm/compaction.c')
-rw-r--r-- | mm/compaction.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index c43789388cd8..b5326b141a25 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -677,6 +677,13 @@ static void isolate_freepages(struct zone *zone, | |||
677 | pfn -= pageblock_nr_pages) { | 677 | pfn -= pageblock_nr_pages) { |
678 | unsigned long isolated; | 678 | unsigned long isolated; |
679 | 679 | ||
680 | /* | ||
681 | * This can iterate a massively long zone without finding any | ||
682 | * suitable migration targets, so periodically check if we need | ||
683 | * to schedule. | ||
684 | */ | ||
685 | cond_resched(); | ||
686 | |||
680 | if (!pfn_valid(pfn)) | 687 | if (!pfn_valid(pfn)) |
681 | continue; | 688 | continue; |
682 | 689 | ||