From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHSET sched_ext/for-6.15] sched_ext: Enhance built-in idle selection with preferred CPUs
Date: Thu, 6 Mar 2025 19:54:34 +0100 [thread overview]
Message-ID: <Z8nvam-WarNqdLw9@gpd3> (raw)
In-Reply-To: <Z8nqpyEQmmff9E8X@slm.duckdns.org>
Hi Tejun,
On Thu, Mar 06, 2025 at 08:34:15AM -1000, Tejun Heo wrote:
> Hello,
>
> On Thu, Mar 06, 2025 at 07:18:03PM +0100, Andrea Righi wrote:
> > To implement this, introduce a new helper kfunc scx_bpf_select_cpu_pref()
> > that allows to specify a cpumask of preferred CPUs:
> >
> > s32 scx_bpf_select_cpu_pref(struct task_struct *p,
> > const struct cpumask *preferred_cpus,
> > s32 prev_cpu, u64 wake_flags, u64 flags);
> >
> > Moreover, introduce the new idle flag %SCX_PICK_IDLE_IN_PREF that can be
> > used to enforce selection strictly within the preferred domain.
>
> Would something like scx_bpf_select_cpu_and() work which is only allowed
> pick in the intersection (ie. always SCX_PICK_IDLE_IN_PREF). I'm not sure
> how much more beneficial a built-in two-level mechanism is especially given
> that it wouldn't be too uncommon to need multi-level pick - e.g. within l3
> then within numa node and so on.
Just to make sure I understand, you mean provide two separate kfuncs:
scx_bpf_select_cpu_and() and scx_bpf_select_cpu_pref(), instead of
introducing the flag?
Thanks,
-Andrea
next prev parent reply other threads:[~2025-03-06 18:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 18:18 [PATCHSET sched_ext/for-6.15] sched_ext: Enhance built-in idle selection with preferred CPUs Andrea Righi
2025-03-06 18:18 ` [PATCH 1/4] sched_ext: idle: Honor idle flags in the built-in idle selection policy Andrea Righi
2025-03-06 18:18 ` [PATCH 2/4] sched_ext: idle: Introduce the concept of preferred CPUs Andrea Righi
2025-03-06 18:18 ` [PATCH 3/4] sched_ext: idle: Introduce scx_bpf_select_cpu_pref() Andrea Righi
2025-03-07 3:15 ` Changwoo Min
2025-03-07 6:35 ` Andrea Righi
2025-03-06 18:18 ` [PATCH 4/4] selftests/sched_ext: Add test for scx_bpf_select_cpu_pref() Andrea Righi
2025-03-06 18:34 ` [PATCHSET sched_ext/for-6.15] sched_ext: Enhance built-in idle selection with preferred CPUs Tejun Heo
2025-03-06 18:54 ` Andrea Righi [this message]
2025-03-06 18:58 ` Tejun Heo
2025-03-06 19:02 ` Andrea Righi
2025-03-07 3:14 ` Changwoo Min
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=Z8nvam-WarNqdLw9@gpd3 \
--to=arighi@nvidia.com \
--cc=bpf@vger.kernel.org \
--cc=changwoo@igalia.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.