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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1466301103-6436-1-git-send-email-wwtao0320@163.com>
Date:	Sun, 19 Jun 2016 09:51:43 +0800
From:	Wenwei Tao <wwtao0320@....com>
To:	akpm@...ux-foundation.org, mgorman@...hsingularity.net
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	ww.tao0320@...il.com
Subject: [RFC PATCH 3/3] mm, page_alloc: prevent merge freepages between highatomic and others

From: Wenwei Tao <ww.tao0320@...il.com>

We might not want other migrate types pin highatomic pageblock
away since it's reserved for high order use. And also we might
not want reserve high atomic pages out of limit, we can add
check in __free_one_page but this might be costly, so just stop
the merging.

Signed-off-by: Wenwei Tao <ww.tao0320@...il.com>
---
 mm/page_alloc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b72b771..ffce9b5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -832,7 +832,8 @@ continue_merging:
 		 * We don't want to hit this code for the more frequent
 		 * low-order merging.
 		 */
-		if (unlikely(has_isolate_pageblock(zone))) {
+		if (unlikely(has_isolate_pageblock(zone) ||
+				zone->nr_reserved_highatomic)) {
 			int buddy_mt;
 
 			buddy_idx = __find_buddy_index(page_idx, order);
@@ -841,7 +842,9 @@ continue_merging:
 
 			if (migratetype != buddy_mt
 					&& (is_migrate_isolate(migratetype) ||
-						is_migrate_isolate(buddy_mt)))
+					is_migrate_isolate(buddy_mt) ||
+					migratetype == MIGRATE_HIGHATOMIC ||
+					buddy_mt == MIGRATE_HIGHATOMIC))
 				goto done_merging;
 		}
 		max_order++;
-- 
1.8.3.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ