From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>
Cc: David Vernet <void@manifault.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched_ext: introduce LLC awareness to the default idle selection policy
Date: Tue, 22 Oct 2024 07:32:26 +0200 [thread overview]
Message-ID: <Zxc46lMpelf_BKHw@gpd3> (raw)
In-Reply-To: <ZxazF56XRJ3CJ0mN@slm.duckdns.org>
On Mon, Oct 21, 2024 at 10:01:27AM -1000, Tejun Heo wrote:
> External email: Use caution opening links or attachments
>
>
> Hello,
>
> Overall, I think this is a great idea.
>
> On Mon, Oct 21, 2024 at 09:13:04AM +0200, Andrea Righi wrote:
> ...
> > + /*
> > + * Determine the task's LLC domain.
> > + */
> > + sd = rcu_dereference(per_cpu(sd_llc, prev_cpu));
> > + if (sd)
> > + cpumask_and(llc_cpus, sched_domain_span(sd), p->cpus_ptr);
> > + else
> > + cpumask_copy(llc_cpus, p->cpus_ptr);
>
> However, I wonder whether we can be a bit more efficient here. Always
> copying cpumasks can become noticeable in larger machines. It should be
> possible to cover most common cases without copying cpumasks - e.g. tasks
> which don't have any cpumask restrictions or affine within a single LLC
> (including tasks restricted to one CPU) don't need to compute a new cpumask
> each time. They can use either sched_domain_span() or p->cpus_ptr directly.
I agree, I was also thinking to improve this part to avoid doing the
copy. And I have a few other changes to apply, I'll send a v2 soon.
Thanks!
-Andrea
>
> Thanks.
>
> --
> tejun
prev parent reply other threads:[~2024-10-22 5:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 7:13 [PATCH] sched_ext: introduce LLC awareness to the default idle selection policy Andrea Righi
2024-10-21 20:01 ` Tejun Heo
2024-10-22 5:32 ` 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=Zxc46lMpelf_BKHw@gpd3 \
--to=arighi@nvidia.com \
--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