From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Yury Norov <yury.norov@gmail.com>, Ingo Molnar <mingo@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
"Vincent Guittot" <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched/fair: simplify task_numa_find_cpu()
Date: Fri, 12 Sep 2025 08:10:21 +0530 [thread overview]
Message-ID: <d8bb7091-7127-41df-9a2d-0b51897592a7@amd.com> (raw)
In-Reply-To: <20250911203136.548844-1-yury.norov@gmail.com>
Hello Yury,
On 9/12/2025 2:01 AM, Yury Norov wrote:
> From: Yury Norov (NVIDIA) <yury.norov@gmail.com>
>
> Use for_each_cpu_and() and drop some housekeeping code.
Please feel free to include:
Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
>
> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.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;
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2025-09-12 2:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 20:31 Yury Norov
2025-09-11 21:20 ` Phil Auld
2025-09-12 2:40 ` K Prateek Nayak [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-10-30 7:25 [PATCH] sched/fair: Simplify task_numa_find_cpu() Yuan ZhaoXiong
2021-11-01 11:18 ` Mel Gorman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8bb7091-7127-41df-9a2d-0b51897592a7@amd.com \
--to=kprateek.nayak@amd.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®