From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>, David Vernet <void@manifault.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sched_ext: Introduce LLC awareness to the default idle selection policy
Date: Tue, 22 Oct 2024 16:55:51 +0200 [thread overview]
Message-ID: <Zxe89zvC5uhI7ZxG@gpd3> (raw)
In-Reply-To: <20241022101422.212810-1-arighi@nvidia.com>
On Tue, Oct 22, 2024 at 12:14:22PM +0200, Andrea Righi wrote:
...
> + /*
> + * Determine the task's LLC domain.
> + */
> + llc_mask = llc_domain(prev_cpu);
> + if (llc_cpus && llc_mask)
> + llc_empty = !cpumask_and(llc_cpus, llc_mask, p->cpus_ptr);
> + else
> + llc_empty = true;
Thinking more about this, we can avoid re-generating the llc_cpus
cpumask when the task can run on all CPUs (likely the majority of the
cases) and it's probably more efficient to check for
cpumask_equal(p->cpus_ptr, cpu_possible_mask) and just use llc_mask in
this case.
We could also optimize tasks that can only run on 1 CPU, but we never
call ops.select_cpu() for them, they're just skipped in
select_task_rq(), so I'm not sure if we should handle this special case
(maybe I can add a comment, to make it more clear).
-Andrea
next prev parent reply other threads:[~2024-10-22 14:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 10:14 [PATCH v2] sched_ext: Introduce LLC awareness to the default idle selection policy Andrea Righi
2024-10-22 14:55 ` Andrea Righi [this message]
2024-10-22 19:11 ` Tejun Heo
2024-10-22 21:33 ` 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=Zxe89zvC5uhI7ZxG@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.