lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1427160712-16064-1-git-send-email-gioh.kim@lge.com>
Date:	Tue, 24 Mar 2015 10:31:52 +0900
From:	Gioh Kim <gioh.kim@....com>
To:	akpm@...ux-foundation.org, vbabka@...e.cz, rientjes@...gle.com,
	iamjoonsoo.kim@....com
Cc:	mgorman@...e.de, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	gunho.lee@....com, Gioh Kim <gioh.kim@....com>
Subject: [PATCHv2] mm/compaction: reset compaction scanner positions

When the compaction is activated via /proc/sys/vm/compact_memory
it would better scan the whole zone.
And some platform, for instance ARM, has the start_pfn of a zone is zero.
Therefore the first try to compaction via /proc doesn't work.
It needs to force to reset compaction scanner position at first.

Signed-off-by: Gioh Kim <gioh.kim@....com>
Acked-by: Vlastimil Babka <vbabka@...e.cz>
Acked-by: David Rientjes <rientjes@...gle.com>
---
 mm/compaction.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mm/compaction.c b/mm/compaction.c
index 8c0d945..ccf48ce 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1587,6 +1587,14 @@ static void __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc)
 		INIT_LIST_HEAD(&cc->freepages);
 		INIT_LIST_HEAD(&cc->migratepages);
 
+		/*
+		 * When called via /proc/sys/vm/compact_memory
+		 * this makes sure we compact the whole zone regardless of
+		 * cached scanner positions.
+		 */
+		if (cc->order == -1)
+			__reset_isolation_suitable(zone);
+
 		if (cc->order == -1 || !compaction_deferred(zone, cc->order))
 			compact_zone(zone, cc);
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ