From: Mikulas Patocka <mpatocka@redhat.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Josef Schlehofer <pepe.schlehofer@gmail.com>,
Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
Benjamin Marzinski <bmarzins@redhat.com>,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Ignat Korchagin <ignat@linux.win>,
Milan Broz <gmazyland@gmail.com>
Subject: Re: [PATCH] dm-crypt: defer async write submission to write thread
Date: Mon, 9 Nov 2026 13:18:04 +0100 (CET) [thread overview]
Message-ID: <4093292e-1fa1-dc18-b185-18dff61a32bf@redhat.com> (raw)
In-Reply-To: <0197be1d-1257-4597-aea2-1a065fe0a1d5@kernel.org>
On Mon, 9 Nov 2026, Damien Le Moal wrote:
> On 11/5/26 16:27, Josef Schlehofer wrote:
> > With no_write_workqueue, kcryptd_crypt_write_io_submit() submits the
> > bio directly, even when called from kcryptd_async_done(). An async
> > cipher may run this callback in softirq or with BH disabled, where
> > submit_bio_noacct() must not be called because it can sleep.
> >
> > Submit inline only when async is false. Async completions are sent to
> > the write thread, as is already done for submit_from_crypt_cpus. Use
> > the async flag rather than in_interrupt(), since callback context
> > depends on the cipher driver. Sync ciphers still submit inline.
> >
> > Tested with cryptd in QEMU (x86_64 and arm64) with
> > CONFIG_DEBUG_ATOMIC_SLEEP, and on a P2020 running 6.18.55 without it.
>
> Originally, this was added to avoid write reordering for zoned block devices.
> So did you test this change with that (scsi_debug or null-blk) ? You can also
> use an emulated NVMe ZNS device in QEMU.
So, should we disable asynchronous crypto operations for zoned devices?
Would you send a patch for that?
Mikulas
prev parent reply other threads:[~2026-11-09 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 7:27 Josef Schlehofer
2026-11-09 6:08 ` Damien Le Moal
2026-11-09 12:18 ` Mikulas Patocka [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=4093292e-1fa1-dc18-b185-18dff61a32bf@redhat.com \
--to=mpatocka@redhat.com \
--cc=agk@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dlemoal@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=gmazyland@gmail.com \
--cc=ignat@linux.win \
--cc=linux-kernel@vger.kernel.org \
--cc=pepe.schlehofer@gmail.com \
--cc=snitzer@kernel.org \
--cc=stable@vger.kernel.org \
/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®