From: Tejun Heo <tj@kernel.org>
To: Qiurong Fang <fangqiurong@kylinos.cn>
Cc: Tejun Heo <tj@kernel.org>,
arighi@nvidia.com, void@manifault.com, changwoo@igalia.com,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] sched_ext: Don't run ops.dequeue() with a DSQ lock held
Date: Wed, 16 Sep 2026 11:01:30 -1000 [thread overview]
Message-ID: <fbec605f57bd861a9b4c53f16e7f0197@kernel.org> (raw)
In-Reply-To: <20260916070753.3343113-2-fangqiurong@kylinos.cn>
Hello, Qiurong.
On Wed, Sep 16, 2026 at 03:07:52PM +0800, Qiurong Fang wrote:
> ops.dequeue() can only call the "any" kfuncs and none of them can lock a
> builtin DSQ, so the global and bypass paths can't deadlock; however,
> all DSQ locks share one lockdep class, so iterating any user DSQ from
> ops.dequeue() there trips the recursion check.
"there" has no referent. "on those paths" or similar.
> + * The custody transfer happens under @dsq->lock so that
> + * later consumers see the flag clear; the callback runs
> + * unlocked - it must not run with a DSQ lock held.
The callback isn't unlocked. The rq lock is held on every path. Only
@dsq->lock is dropped. Say that it runs after @dsq->lock is dropped because
it may lock a DSQ itself.
> - /* @p is on @dst_rq, an rq-owned @src_dsq is covered by the rq lock */
> - if (!dsq_is_rq_owned(src_dsq))
> - lockdep_assert_held(&src_dsq->lock);
This leaves @src_dsq unused in scx_move_local_task_to_local_dsq(). Please
drop the parameter from the function and its callers, including the three
in sub.c.
Thanks.
--
tejun
next prev parent reply other threads:[~2026-09-16 21:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 7:07 [PATCH v3 0/2] " Qiurong Fang
2026-09-16 7:07 ` [PATCH v3 1/2] " Qiurong Fang
2026-09-16 21:01 ` Tejun Heo [this message]
2026-09-16 7:07 ` [PATCH v3 2/2] selftests/sched_ext: Test that ops.dequeue() can iterate the consumed DSQ Qiurong Fang
2026-09-16 21:01 ` 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=fbec605f57bd861a9b4c53f16e7f0197@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=fangqiurong@kylinos.cn \
--cc=linux-kernel@vger.kernel.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 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®