From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH sched_ext/for-6.19] sched_ext: Move __SCX_DSQ_ITER_ALL_FLAGS BUILD_BUG_ON to the right place
Date: Tue, 4 Nov 2025 22:50:32 +0100 [thread overview]
Message-ID: <aQp1KGGSPF6m4NVm@gpd4> (raw)
In-Reply-To: <b12ef0a8bd20e1ab8849ea129db70bad@kernel.org>
On Tue, Nov 04, 2025 at 11:40:22AM -1000, Tejun Heo wrote:
> The BUILD_BUG_ON() which checks that __SCX_DSQ_ITER_ALL_FLAGS doesn't
> overlap with the private lnode bits was in scx_task_iter_start() which has
> nothing to do with DSQ iteration. Move it to bpf_iter_scx_dsq_new() where it
> belongs.
>
> No functional changes.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
Looks good (both patches)
Acked-by: Andrea Righi <arighi@nvidia.com>
Thanks,
-Andrea
> ---
> kernel/sched/ext.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -474,9 +474,6 @@ struct scx_task_iter {
> */
> static void scx_task_iter_start(struct scx_task_iter *iter)
> {
> - BUILD_BUG_ON(__SCX_DSQ_ITER_ALL_FLAGS &
> - ((1U << __SCX_DSQ_LNODE_PRIV_SHIFT) - 1));
> -
> spin_lock_irq(&scx_tasks_lock);
>
> iter->cursor = (struct sched_ext_entity){ .flags = SCX_TASK_CURSOR };
> @@ -6218,6 +6215,8 @@ __bpf_kfunc int bpf_iter_scx_dsq_new(str
> sizeof(struct bpf_iter_scx_dsq));
> BUILD_BUG_ON(__alignof__(struct bpf_iter_scx_dsq_kern) !=
> __alignof__(struct bpf_iter_scx_dsq));
> + BUILD_BUG_ON(__SCX_DSQ_ITER_ALL_FLAGS &
> + ((1U << __SCX_DSQ_LNODE_PRIV_SHIFT) - 1));
>
> /*
> * next() and destroy() will be called regardless of the return value.
next prev parent reply other threads:[~2025-11-04 21:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 21:40 [PATCH sched_ext/for-6.19] sched_ext: Move __SCX_DSQ_ITER_ALL_FLAGS BUILD_BUG_ON to the right place Tejun Heo
2025-11-04 21:42 ` [PATCH sched_ext/for-6.19] sched_ext: Minor cleanups to scx_task_iter Tejun Heo
2025-11-04 21:50 ` Andrea Righi [this message]
2025-11-04 21:50 ` [PATCH] sched_ext: Move __SCX_DSQ_ITER_ALL_FLAGS BUILD_BUG_ON to the right place Tejun Heo
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=aQp1KGGSPF6m4NVm@gpd4 \
--to=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--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