Skip to contentSkip to conversation

+ mm-compactionc-periodically-schedule-when-freeing-pages.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Sep 18, 2013

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + mm-compactionc-periodically-schedule-when-freeing-pages.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 18 Sep 2013 15:34:32 -0700

The patch titled
Subject: mm/compaction.c: periodically schedule when freeing pages
has been added to the -mm tree. Its filename is
mm-compactionc-periodically-schedule-when-freeing-pages.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-compactionc-periodically-schedule-when-freeing-pages.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-compactionc-periodically-schedule-when-freeing-pages.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: David Rientjes <[email protected]>
Subject: mm/compaction.c: periodically schedule when freeing pages

We've been getting warnings about an excessive amount of time spent allocating pages for migration during memory compaction without scheduling. isolate_freepages_block() already periodically checks for contended locks or the need to schedule, but isolate_freepages() never does.

When a zone is massively long and no suitable targets can be found, this iteration can be quite expensive without ever doing cond_resched().

Check periodically for the need to reschedule while the compaction free scanner iterates.

---

 mm/compaction.c |    7 +++++++
 1 file changed, 7 insertions(+)
mm/compaction.c renamed from mm/compaction.c~mm-compactionc-periodically-schedule-when-freeing-pages +7 -0
diff -puN mm/compaction.c~mm-compactionc-periodically-schedule-when-freeing-pages mm/compaction.c
@@ -677,6 +677,13 @@ static void isolate_freepages(struct zon
 					pfn -= pageblock_nr_pages) {
 		unsigned long isolated;
 
+		/*
+		 * This can iterate a massively long zone without finding any
+		 * suitable migration targets, so periodically check if we need
+		 * to schedule.
+		 */
+		cond_resched();
+
 		if (!pfn_valid(pfn))
 			continue;
 

_

Patches currently in -mm which might be from [email protected] are

mm-compactionc-periodically-schedule-when-freeing-pages.patch mm-acpi-use-numa_no_node.patch
x86-srat-use-numa_no_node.patch
mm-vmalloc-use-numa_no_node.patch
mm-vmalloc-dont-set-area-caller-twice.patch mm-vmalloc-revert-mm-vmallocc-emit-the-failure-message-before-return.patch mm-vmalloc-revert-mm-vmallocc-check-vm_uninitialized-flag-in-s_show-instead-of-show_numa_info.patch mm-vmalloc-fix-show-vmap_area-information-race-with-vmap_area-tear-down.patch