All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Tao Cui <cui.tao@linux.dev>
Cc: Tao Cui <cuitao@kylinos.cn>,
	void@manifault.com, arighi@nvidia.com, changwoo@igalia.com,
	mingo@redhat.com, peterz@infradead.org,
	sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH] sched_ext: don't BUG_ON a destroyed DSQ in process_deferred_reenq_users
Date: Fri, 14 Aug 2026 08:56:54 -1000	[thread overview]
Message-ID: <f3a7965cc9d6527de793fdda816b6b63@kernel.org> (raw)
In-Reply-To: <20260811075913.344033-1-cui.tao@linux.dev>

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

  reply	other threads:[~2026-08-14 18:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11  7:59 [PATCH] sched_ext: don't BUG_ON a destroyed DSQ in process_deferred_reenq_users Tao Cui
2026-08-14 18:56 ` Tejun Heo [this message]
2026-08-15  0:01   ` Tao Cui

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=f3a7965cc9d6527de793fdda816b6b63@kernel.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=bpf@vger.kernel.org \
    --cc=changwoo@igalia.com \
    --cc=cui.tao@linux.dev \
    --cc=cuitao@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sched-ext@lists.linux.dev \
    --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.