[PATCH 11/16] [PATCH v3 11/12] Remove waste calculation to improve performance.

Atsushi Kumagai kumagai-atsushi at mxc.nes.nec.co.jp
Thu Aug 30 03:55:42 EDT 2012


From: Atsushi Kumagai <kumagai-atsushi at mxc.nes.nec.co.jp>
Date: Fri, 24 Aug 2012 10:16:52 +0900
Subject: [PATCH 11/16] [PATCH v3 11/12] Remove waste calculation to improve performance.

This patch adds check whether each page correspond to target memory
region or not into filtering logic.

Signed-off-by: Atsushi Kumagai <kumagai-atsushi at mxc.nes.nec.co.jp>
---
 makedumpfile.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/makedumpfile.c b/makedumpfile.c
index cc90d39..879f73a 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -3751,6 +3751,12 @@ __exclude_unnecessary_pages(unsigned long mem_map,
 	for (pfn = pfn_start; pfn < pfn_end; pfn++, mem_map += SIZE(page)) {
 
 		/*
+		 * If this pfn doesn't belong to target region, skip this pfn.
+		 */
+		if (info->flag_cyclic && !is_cyclic_region(pfn))
+			continue;
+
+		/*
 		 * Exclude the memory hole.
 		 */
 		if (is_xen_memory()) {
-- 
1.7.9.2



More information about the kexec mailing list