From: Tejun Heo <tj@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
Joel Fernandes <joelagnelf@nvidia.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] sched_ext: idle: Deprecate scx_bpf_select_cpu_dfl()
Date: Mon, 31 Mar 2025 12:01:22 -1000 [thread overview]
Message-ID: <Z-sQsqt6kKLqJfJf@slm.duckdns.org> (raw)
In-Reply-To: <20250321221454.298202-7-arighi@nvidia.com>
Hello,
On Fri, Mar 21, 2025 at 11:10:52PM +0100, Andrea Righi wrote:
> With the introduction of scx_bpf_select_cpu_and(), we can deprecate
> scx_bpf_select_cpu_dfl(), as it offers only a subset of features and
> it's also more consistent with other idle-related APIs (returning a
> negative value when no idle CPU is found).
>
> Therefore, mark scx_bpf_select_cpu_dfl() as deprecated (printing a
> warning when it's used), update all the scheduler examples and
> kselftests to adopt the new API, and ensure backward (source and binary)
> compatibility by providing the necessary macros and hooks.
>
> Support for scx_bpf_select_cpu_dfl() can be maintained until v6.17.
Do we need to deprecate it?
...
> @@ -43,10 +39,13 @@ s32 BPF_STRUCT_OPS(select_cpu_dfl_nodispatch_select_cpu, struct task_struct *p,
> return -ESRCH;
> }
>
> - cpu = scx_bpf_select_cpu_dfl(p, prev_cpu, wake_flags,
> - &tctx->force_local);
> + cpu = scx_bpf_select_cpu_and(p, prev_cpu, wake_flags, p->cpus_ptr, 0);
> + if (cpu >= 0) {
> + tctx->force_local = true;
> + return cpu;
> + }
>
> - return cpu;
> + return prev_cpu;
> }
scx_bpf_select_cpu_dfl() is simpler for simple cases. I don't see a pressing
need to convert everybody to _and().
Thanks.
--
tejun
next prev parent reply other threads:[~2025-03-31 22:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 22:10 [PATCHSET v6 sched_ext/for-6.15] sched_ext: Enhance built-in idle selection with allowed CPUs Andrea Righi
2025-03-21 22:10 ` [PATCH 1/6] sched_ext: idle: Extend topology optimizations to all tasks Andrea Righi
2025-03-21 22:10 ` [PATCH 2/6] sched_ext: idle: Explicitly pass allowed cpumask to scx_select_cpu_dfl() Andrea Righi
2025-03-31 21:50 ` Tejun Heo
2025-04-01 6:21 ` Andrea Righi
2025-03-21 22:10 ` [PATCH 3/6] sched_ext: idle: Accept an arbitrary cpumask in scx_select_cpu_dfl() Andrea Righi
2025-03-31 21:56 ` Tejun Heo
2025-04-01 6:33 ` Andrea Righi
2025-03-21 22:10 ` [PATCH 4/6] sched_ext: idle: Introduce scx_bpf_select_cpu_and() Andrea Righi
2025-03-31 21:59 ` Tejun Heo
2025-04-01 6:35 ` Andrea Righi
2025-03-21 22:10 ` [PATCH 5/6] selftests/sched_ext: Add test for scx_bpf_select_cpu_and() Andrea Righi
2025-03-21 22:10 ` [PATCH 6/6] sched_ext: idle: Deprecate scx_bpf_select_cpu_dfl() Andrea Righi
2025-03-31 22:01 ` Tejun Heo [this message]
2025-04-01 6:38 ` Andrea Righi
2025-03-22 3:56 ` [PATCHSET v6 sched_ext/for-6.15] sched_ext: Enhance built-in idle selection with allowed CPUs Changwoo Min
-- strict thread matches above, loose matches on Subject: below --
2025-03-20 7:36 [PATCHSET v5 " Andrea Righi
2025-03-20 7:36 ` [PATCH 6/6] sched_ext: idle: Deprecate scx_bpf_select_cpu_dfl() Andrea Righi
2025-03-17 17:53 [PATCHSET v4 sched_ext/for-6.15] sched_ext: Enhance built-in idle selection with allowed CPUs Andrea Righi
2025-03-17 17:53 ` [PATCH 6/6] sched_ext: idle: Deprecate scx_bpf_select_cpu_dfl() Andrea Righi
2025-03-07 20:01 [PATCHSET v2 sched_ext/for-6.15] sched_ext: Enhance built-in idle selection with allowed CPUs Andrea Righi
2025-03-07 20:01 ` [PATCH 6/6] sched_ext: idle: Deprecate scx_bpf_select_cpu_dfl() 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=Z-sQsqt6kKLqJfJf@slm.duckdns.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=joelagnelf@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®