From: Andrea Righi <andrea.righi@linux.dev>
To: Tejun Heo <tj@kernel.org>
Cc: David Vernet <void@manifault.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched_ext: improve WAKE_SYNC behavior for default idle CPU selection
Date: Fri, 18 Oct 2024 19:58:29 +0200 [thread overview]
Message-ID: <ZxKhxaM8Wv8EEXMd@gpd3> (raw)
In-Reply-To: <ZxKdAvnLOmzPH4in@slm.duckdns.org>
On Fri, Oct 18, 2024 at 07:38:10AM -1000, Tejun Heo wrote:
> Hello,
>
> On Fri, Oct 18, 2024 at 11:40:33AM +0200, Andrea Righi wrote:
> ...
> > + * If WAKE_SYNC, try to migrate the wakee to the waker's CPU.
> > + */
> > + if (wake_flags & SCX_WAKE_SYNC) {
> > + cpu = smp_processor_id();
> > +
> > + /*
> > + * If the waker's CPU is cache affine and prev_cpu is idle,
> > + * then avoid a migration.
> > + */
> > + if (cpus_share_cache(cpu, prev_cpu) &&
> > + test_and_clear_cpu_idle(prev_cpu))
> > goto cpu_found;
>
> Shouldn't this do set cpu to prev_cpu before jumping to cpu_found?
Ah! You're absolutely right!
Let me send a v2 (and test it).
Thanks,
-Andrea
>
> Thanks.
>
> --
> tejun
prev parent reply other threads:[~2024-10-18 17:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 9:40 Andrea Righi
2024-10-18 17:38 ` Tejun Heo
2024-10-18 17:58 ` Andrea Righi [this message]
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=ZxKhxaM8Wv8EEXMd@gpd3 \
--to=andrea.righi@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=void@manifault.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®