[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250911212054.GD7235@pauld.westford.csb>
Date: Thu, 11 Sep 2025 17:20:54 -0400
From: Phil Auld <pauld@...hat.com>
To: Yury Norov <yury.norov@...il.com>
Cc: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched/fair: simplify task_numa_find_cpu()
On Thu, Sep 11, 2025 at 04:31:35PM -0400 Yury Norov wrote:
> From: Yury Norov (NVIDIA) <yury.norov@...il.com>
>
> Use for_each_cpu_and() and drop some housekeeping code.
>
> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@...il.com>
The "housekeeping" part threw me off for a second. I was looking for
isolation related code being dropped :)
Reviewed-by: Phil Auld <pauld@...hat.com>
> ---
> kernel/sched/fair.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 0990ed90c14e..c48c0975fe7a 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -2474,11 +2474,8 @@ static void task_numa_find_cpu(struct task_numa_env *env,
> maymove = !load_too_imbalanced(src_load, dst_load, env);
> }
>
> - for_each_cpu(cpu, cpumask_of_node(env->dst_nid)) {
> - /* Skip this CPU if the source task cannot migrate */
> - if (!cpumask_test_cpu(cpu, env->p->cpus_ptr))
> - continue;
> -
> + /* Skip CPUs if the source task cannot migrate */
> + for_each_cpu_and(cpu, cpumask_of_node(env->dst_nid), env->p->cpus_ptr) {
> env->dst_cpu = cpu;
> if (task_numa_compare(env, taskimp, groupimp, maymove))
> break;
> --
> 2.43.0
>
>
--
Powered by blists - more mailing lists