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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 13 Apr 2022 14:52:06 +0530
From:   Jagdish Gediya <jvgediya@...ux.ibm.com>
To:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc:     akpm@...ux-foundation.org, aneesh.kumar@...ux.ibm.com,
        baolin.wang@...ux.alibaba.com, dave.hansen@...ux.intel.com,
        ying.huang@...el.com, Jagdish Gediya <jvgediya@...ux.ibm.com>
Subject: [PATCH v2 5/5] mm: demotion: Build demotion list based on N_DEMOTION_TARGETS

Only nodes which has state N_DEMOTION_TARGETS should be
used as demotion targets.

make nodes which are not in demotion targets as source nodes
while building demotion target list.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>
Signed-off-by: Jagdish Gediya <jvgediya@...ux.ibm.com>
---
 mm/migrate.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 4d3d80ca0a7f..e517a5ab1fcf 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2394,10 +2394,11 @@ static void __set_migration_target_nodes(void)
 	disable_all_migrate_targets();
 
 	/*
-	 * Allocations go close to CPUs, first.  Assume that
-	 * the migration path starts at the nodes with CPUs.
+	 * Pick demotion targets only from node_states[N_DEMOTION_TARGETS]
+	 * so make nodes which are not in demotion targets as source nodes
 	 */
-	next_pass = node_states[N_CPU];
+	nodes_andnot(next_pass, node_states[N_ONLINE],
+		     node_states[N_DEMOTION_TARGETS]);
 again:
 	this_pass = next_pass;
 	next_pass = NODE_MASK_NONE;
-- 
2.35.1

Powered by blists - more mailing lists