From: Tejun Heo <tj@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
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: Mon, 21 Oct 2024 10:01:27 -1000 [thread overview]
Message-ID: <ZxazF56XRJ3CJ0mN@slm.duckdns.org> (raw)
In-Reply-To: <20241021071304.27856-1-arighi@nvidia.com>
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.
Thanks.
--
tejun
next prev parent reply other threads:[~2024-10-21 20:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 7:13 Andrea Righi
2024-10-21 20:01 ` Tejun Heo [this message]
2024-10-22 5:32 ` Andrea Righi
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=ZxazF56XRJ3CJ0mN@slm.duckdns.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=linux-kernel@vger.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®