BPF List
 help / color / mirror / Atom feed
From: Tao Cui <cui.tao@linux.dev>
To: Tejun Heo <tj@kernel.org>
Cc: cui.tao@linux.dev, 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: Sat, 15 Aug 2026 08:01:21 +0800	[thread overview]
Message-ID: <d7e534e1-ab78-4c6e-ad0c-0cfeed5049e6@linux.dev> (raw)
In-Reply-To: <f3a7965cc9d6527de793fdda816b6b63@kernel.org>



在 2026/8/15 02:56, Tejun Heo 写道:
> 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.
> 
Right, that was too broad. v2 skips only SCX_DSQ_INVALID and keeps the BUG_ON otherwise, as you suggested. Also fixed the subject capitalization and the blank line between the tags.

Thanks,
Tao

> Thanks.
> 
> --
> tejun


      reply	other threads:[~2026-08-15  0:01 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
2026-08-15  0:01   ` Tao Cui [this message]

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=d7e534e1-ab78-4c6e-ad0c-0cfeed5049e6@linux.dev \
    --to=cui.tao@linux.dev \
    --cc=arighi@nvidia.com \
    --cc=bpf@vger.kernel.org \
    --cc=changwoo@igalia.com \
    --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=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