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]
Message-ID: <20250908061923.543081-1-wujianyong@hygon.cn>
Date: Mon, 8 Sep 2025 14:19:23 +0800
From: Jianyong Wu <wujianyong@...on.cn>
To: <mingo@...hat.com>, <peterz@...radead.org>, <juri.lelli@...hat.com>,
	<riel@...riel.com>, <vincent.guittot@...aro.org>, <jianyong.wu@...look.com>,
	<wujianyong@...on.cn>
CC: <dietmar.eggemann@....com>, <rostedt@...dmis.org>, <bsegall@...gle.com>,
	<mgorman@...e.de>, <vschneid@...hat.com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] sched/fair: Correct misleading comment in task_numa_migrate()

The current comment implies that both the task and the group must get
benefit for a node to be considered. However, the actual code allows
a node to pass if *either* the task *or* the group meets the criteria.

As established in the previous discussion [1], the code logic is correct.
Update the comment to accurately reflect that either condition is
sufficient.

Signed-off-by: Jianyong Wu <wujianyong@...on.cn>

[1] Link: https://lore.kernel.org/lkml/55806A24.7030403@redhat.com/
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b173a059315c..9069ea4c71f1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2565,7 +2565,7 @@ static int task_numa_migrate(struct task_struct *p)
 				groupweight = group_weight(p, env.src_nid, dist);
 			}
 
-			/* Only consider nodes where both task and groups benefit */
+			/* Consider nodes where either task or groups benefit */
 			taskimp = task_weight(p, nid, dist) - taskweight;
 			groupimp = group_weight(p, nid, dist) - groupweight;
 			if (taskimp < 0 && groupimp < 0)
-- 
2.43.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ