mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/fair: Correct misleading comment in task_numa_migrate()
@ 2025-09-08  6:19 Jianyong Wu
  2025-09-08 16:25 ` Rik van Riel
  0 siblings, 1 reply; 3+ messages in thread
From: Jianyong Wu @ 2025-09-08  6:19 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, riel, vincent.guittot, jianyong.wu,
	wujianyong
  Cc: dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, linux-kernel

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@hygon.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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sched/fair: Correct misleading comment in task_numa_migrate()
  2025-09-08  6:19 [PATCH] sched/fair: Correct misleading comment in task_numa_migrate() Jianyong Wu
@ 2025-09-08 16:25 ` Rik van Riel
  2025-09-26 11:59   ` Jianyong Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Rik van Riel @ 2025-09-08 16:25 UTC (permalink / raw)
  To: Jianyong Wu, mingo, peterz, juri.lelli, vincent.guittot, jianyong.wu
  Cc: dietmar.eggemann, rostedt, bsegall, mgorman, vschneid, linux-kernel

On Mon, 2025-09-08 at 14:19 +0800, Jianyong Wu wrote:
> 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@hygon.cn>

Reviewed-by: Rik van Riel <riel@surriel.com>

-- 
All Rights Reversed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] sched/fair: Correct misleading comment in task_numa_migrate()
  2025-09-08 16:25 ` Rik van Riel
@ 2025-09-26 11:59   ` Jianyong Wu
  0 siblings, 0 replies; 3+ messages in thread
From: Jianyong Wu @ 2025-09-26 11:59 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, vincent.guittot, Rik van Riel
  Cc: dietmar.eggemann, rostedt, bsegall, mgorman, vschneid,
	linux-kernel, jianyong.wu

Hi Peter, Rik, and maintainers,

Gentle ping on this small comment fix patch.

It was reviewed by Rik about 3 weeks ago and got a " Reviewed-by" [1]. Since then there has been no further comments. I just wonder if there are any other concerns or if it is ready to be picked up.

The original patch is here:

[1] https://lore.kernel.org/lkml/20250908061923.543081-1-wujianyong@hygon.cn/

Thanks for your time.

Best regards,
Jianyong Wu

Jianyong Wu> -----Original Message-----
> From: Rik van Riel <riel@surriel.com>
> Sent: Tuesday, September 9, 2025 12:26 AM
> To: Jianyong Wu <wujianyong@hygon.cn>; mingo@redhat.com;
> peterz@infradead.org; juri.lelli@redhat.com; vincent.guittot@linaro.org;
> jianyong.wu@outlook.com
> Cc: dietmar.eggemann@arm.com; rostedt@goodmis.org; bsegall@google.com;
> mgorman@suse.de; vschneid@redhat.com; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] sched/fair: Correct misleading comment in
> task_numa_migrate()
> 
> On Mon, 2025-09-08 at 14:19 +0800, Jianyong Wu wrote:
> > 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@hygon.cn>
> 
> Reviewed-by: Rik van Riel <riel@surriel.com>
> 
> --
> All Rights Reversed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-26 12:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-08  6:19 [PATCH] sched/fair: Correct misleading comment in task_numa_migrate() Jianyong Wu
2025-09-08 16:25 ` Rik van Riel
2025-09-26 11:59   ` Jianyong Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®