From: Hui Su <sh_def@163.com>
To: Tejun Heo <tj@kernel.org>
Cc: sched-ext@lists.linux.dev, void@manifault.com, arighi@nvidia.com,
changwoo@igalia.com, mingo@redhat.com, peterz@infradead.org,
juri.lelli@redhat.com, vincent.guittot@linaro.org,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, vschneid@redhat.com,
kprateek.nayak@amd.com, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] sched_ext: Hold DSQ refs for deferred reenqueues
Date: Thu, 08 Oct 2026 12:41:18 +0900 [thread overview]
Message-ID: <c672e085a5334a02709a891d447ab857.sh_def@163.com> (raw)
In-Reply-To: <ar1DqN6Ek2VwYLwO@slm.duckdns.org>
Hi Tejun,
On Wed, Sep 30, 2026 at 07:15:20AM -1000, Tejun Heo wrote:
> Can you try to do it without refcnts? DSQ destructions are rare events and
> we can reliably detect whether the DSQ is full or not. I'd much rather make
> the destruction path expensive than adding refcnt to hot paths.
Thanks. v3 follows this direction and adds no refcounting to the deferred
reenqueue path. After the initial grace period, the destruction callback
sweeps the per-CPU deferred lists under the rq lock followed by
deferred_reenq_lock, then checks the DSQ list under its lock. If the list is
still non-empty, it retries the callback, which also covers the case where
an active reenq_user() cursor remains; otherwise it proceeds with final
reclamation.
This keeps the additional synchronization on the rare DSQ destruction path.
v3:
https://lore.kernel.org/lkml/20261008024753.4096008-1-sh_def@163.com/
Thanks,
Hui
next prev parent reply other threads:[~2026-10-08 3:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 14:34 Hui Su
2026-09-30 15:20 ` Hui Su
2026-09-30 17:15 ` Tejun Heo
2026-10-08 3:41 ` Hui Su [this message]
2026-09-30 15:26 ` Andrea Righi
2026-10-08 3:38 ` Hui Su
-- strict thread matches above, loose matches on Subject: below --
2026-09-30 10:17 Hui Su
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=c672e085a5334a02709a891d447ab857.sh_def@163.com \
--to=sh_def@163.com \
--cc=arighi@nvidia.com \
--cc=bsegall@google.com \
--cc=changwoo@igalia.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sched-ext@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=void@manifault.com \
--cc=vschneid@redhat.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®