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>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Nov 2016 12:43:17 +0800
From:   Xishi Qiu <qiuxishi@...wei.com>
To:     Vlastimil Babka <vbabka@...e.cz>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Tang Chen <tangchen@...fujitsu.com>,
        Mel Gorman <mgorman@...hsingularity.net>
CC:     Linux MM <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>,
        "robert.liu@...wei.com" <robert.liu@...wei.com>
Subject: [RFC] mem-hotplug: shall we skip unmovable node when doing numa balance?

On mem-hotplug system, there is a problem, please see the following case.

memtester xxG, the memory will be alloced on a movable node. And after numa
balancing, the memory may be migrated to the other node, it may be a unmovable
node. This will reduce the free memory of the unmovable node, and may be oom
later.

My question is that shall we skip unmovable node when doing numa balance?
or just let the manager set some numa policies?

diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 057964d..f0954ac 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2334,6 +2334,13 @@ int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long
 out:
 	mpol_cond_put(pol);
 
+	/* Skip unmovable nodes when do numa balancing */
+	if (movable_node_enabled && ret != -1) {
+		zone = NODE_DATA(ret)->node_zones + MAX_NR_ZONES - 1;
+		if (!populated_zone(zone))
+			ret = -1;
+	}
+
 	return ret;
 }

Thanks,
Xishi Qiu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ