From: Daniel Byrne <daniel1.byrne@intel.com>
To: dmaengine@vger.kernel.org
Cc: Daniel Byrne <daniel1.byrne@intel.com>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Ziyu Zhang <ziyuzhang201@gmail.com>
Subject: Re: [PATCH v2 10/10] dmaengine: idxd: test a queue under its lock before quiescing it
Date: Mon, 30 Nov 2026 13:06:07 -0800 [thread overview]
Message-ID: <20261130210607.1914190-1-daniel1.byrne@intel.com> (raw)
In-Reply-To: <sashiko-outbox-241935@kernel.org>
On Mon, 30 Nov 2026 20:09:29 +0000, sashiko-bot@kernel.org wrote:
> Can idxd_misc_thread() still deadlock on wq->wq_lock against a command
> waiter in idxd_drv_enable_wq() or idxd_drv_disable_wq()?
Yes, it can, and it could before this patch. v7.4-rc2 makes the same
test without the lock and then calls idxd_wq_quiesce(), which takes
wq_lock, from the same thread. The patch does not change which queues
the thread waits for. It repeats the test once the lock is held.
The changelog and the comment say so for the unbind. They are wrong
about the enable. Only the enable command itself runs while the queue
does not read as an enabled kernel queue yet. What idxd_drv_enable_wq()
issues after it, the interrupt handle request and the commands of its
error path, runs under wq_lock with the queue reading enabled, and the
thread waits behind those too. I'll correct both texts in the next
version.
This series does not close the wait. Ziyu Zhang's patch takes the call
out of the handle revoke path, which leaves the halt handler as the
only caller:
https://lore.kernel.org/r/20261125133123.98687-1-ziyuzhang201@gmail.com
Thanks,
Daniel
prev parent reply other threads:[~2026-11-30 21:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 19:47 [PATCH v2 00/10] dmaengine: idxd: event log, cdev and prep fixes Daniel Byrne
2026-11-30 19:47 ` [PATCH v2 01/10] dmaengine: idxd: don't queue EVL fault work for kernel WQs Daniel Byrne
2026-11-30 19:47 ` [PATCH v2 02/10] dmaengine: idxd: detach the user fault workqueue under the event log lock Daniel Byrne
2026-11-30 19:47 ` [PATCH v2 03/10] dmaengine: idxd: free the event log fault item when no record is copied Daniel Byrne
2026-11-30 19:47 ` [PATCH v2 04/10] dmaengine: idxd: refuse a memcpy longer than the WQ max transfer size Daniel Byrne
2026-11-30 19:47 ` [PATCH v2 05/10] dmaengine: idxd: take an mm_users reference for the completion record copy Daniel Byrne
2026-11-30 19:47 ` [PATCH v2 06/10] dmaengine: idxd: read GENCFG before clearing the event log enable Daniel Byrne
2026-11-30 19:47 ` [PATCH v2 07/10] dmaengine: idxd: don't sleep for a descriptor in the prep callbacks Daniel Byrne
2026-11-30 19:47 ` [PATCH v2 08/10] dmaengine: idxd: read the event log size under its lock in the setup Daniel Byrne
2026-11-30 19:47 ` [PATCH v2 09/10] dmaengine: idxd: free the queue interrupt when the percpu_ref setup fails Daniel Byrne
2026-11-30 19:47 ` [PATCH v2 10/10] dmaengine: idxd: test a queue under its lock before quiescing it Daniel Byrne
2026-11-30 20:09 ` sashiko-bot
2026-11-30 21:06 ` Daniel Byrne [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=20261130210607.1914190-1-daniel1.byrne@intel.com \
--to=daniel1.byrne@intel.com \
--cc=Frank.Li@kernel.org \
--cc=dave.jiang@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=vinicius.gomes@intel.com \
--cc=vkoul@kernel.org \
--cc=ziyuzhang201@gmail.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