From: Mikulas Patocka <mpatocka@redhat.com>
To: Keith Busch <kbusch@kernel.org>
Cc: Keith Busch <kbusch@meta.com>,
dm-devel@lists.linux.dev, snitzer@kernel.org,
linux-block@vger.kernel.org, ebiggers@google.com
Subject: Re: [RFC PATCH] dm-crypt: allow unaligned bio_vecs for direct io
Date: Fri, 26 Sep 2025 16:19:58 +0200 (CEST) [thread overview]
Message-ID: <f3d06d99-638d-99a5-03e3-686b544d97ac@redhat.com> (raw)
In-Reply-To: <aMxnzIavwnJmdAz1@kbusch-mbp>
On Thu, 18 Sep 2025, Keith Busch wrote:
> On Thu, Sep 18, 2025 at 09:16:42AM -0700, Keith Busch wrote:
> > + bio_advance_iter_single(ctx->bio_in, &ctx->iter_in, len);
> > + bytes -= len;
> > + } while (bytes);
> > +
> > + sg_mark_end(sg_in);
> > + sg_in = dmreq->sg_in[0];
>
> Err, there should be an '&' in there, "&dmreq->sg_in[0];"
>
> By the way, I only tested plain64 for the ivmode. That appears to work
> fine, but I am aware this will not be successful with elephant, lmk, or
> tcw. So just an RFC for now to see if it's worth pursuing.
Hi
I'd like to ask - how much does it help performance? How many percent
faster does your application run?
Another question - what if the user uses preadv or pwritev with direct I/O
and uses more than 4 sg lists? Will this be rejected in the upper layers,
or will it reach dm-crypt and return -EINVAL? Note that returning error
from dm-crypt may be quite problematic, because it would kick the leg out
of RAID, if there were RAID above dm-crypt. I think that we should return
BLK_STS_NOTSUPP, because that would be ignored by RAID.
I am considering committing this for the kernel 6.19 (it's too late to add
it to the 6.18 merge window).
Mikulas
next prev parent reply other threads:[~2025-09-26 14:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 16:16 [RFC PATCH] dm-crypt: allow unaligned bio_vecs for direct io Keith Busch
2025-09-18 20:13 ` Keith Busch
2025-09-26 14:19 ` Mikulas Patocka [this message]
2025-09-26 16:17 ` Keith Busch
2025-09-18 20:27 ` Mike Snitzer
2025-09-18 20:52 ` Keith Busch
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=f3d06d99-638d-99a5-03e3-686b544d97ac@redhat.com \
--to=mpatocka@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=ebiggers@google.com \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=linux-block@vger.kernel.org \
--cc=snitzer@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