Re: [PATCH] sched_ext: don't BUG_ON a destroyed DSQ in process_deferred_reenq_users

Tejun Heo <[email protected]>
Newsgroups dev.linux.lists.sched-ext,org.kernel.vger.bpf,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hello,

On Tue, Aug 11, 2026 at 03:59:12PM +0800, Tao Cui wrote:
> -		BUG_ON(dsq->id & SCX_DSQ_FLAG_BUILTIN);
> +		/* destroy_dsq() may race and invalidate @dsq; skip */
> +		if (unlikely(dsq->id & SCX_DSQ_FLAG_BUILTIN))
> +			continue;

Nice catch, but this also swallows states which can never occur
legitimately. The only builtin-flagged value that can show up here is
SCX_DSQ_INVALID from destroy_dsq(). Let's keep the BUG_ON for everything
else:

	/* destroy_dsq() may have raced and invalidated @dsq, nothing to reenq */
	if (unlikely(dsq->id == SCX_DSQ_INVALID))
		continue;

	BUG_ON(dsq->id & SCX_DSQ_FLAG_BUILTIN);

Can you please spin v2? Also, please capitalize the subject after the
prefix ("Don't ...") and remove the blank line between the tags.

Thanks.

--
tejun
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.