From: Christoph Hellwig <hch@lst.de>
To: Bart Van Assche <bvanassche@acm.org>
Cc: John Garry <john.g.garry@oracle.com>,
Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Eric Biggers <ebiggers@kernel.org>
Subject: Re: [PATCH v2 1/2] block: Split blk_crypto_fallback_split_bio_if_needed()
Date: Tue, 15 Jul 2025 07:40:44 +0200 [thread overview]
Message-ID: <20250715054044.GA18159@lst.de> (raw)
In-Reply-To: <52c19699-cead-41b7-a5c5-517f412bcbec@acm.org>
On Mon, Jul 14, 2025 at 08:35:33AM -0700, Bart Van Assche wrote:
> On 7/14/25 6:48 AM, John Garry wrote:
>> since you are touching this code:
>>
>> bio_for_each_segment(bv, bio, iter) {
>> num_sectors += bv.bv_len >> SECTOR_SHIFT;
>> if (++i == BIO_MAX_VECS)
>> break;
>> }
>>
>> if efficiency is a concern, then it seems better to keep the running total
>> in bytes and then >> SECTOR_SHIFT
> Anyone who cares about efficiency should support encryption in hardware
> instead of using the software fallback code. As far as I know, on
> Android phones, the crypto fallback code is only used during hardware
> bringup and not on any devices that are shipped to consumers.
I don't think that's a good argument to not clean something so
obvious up. It doesn't belong into this patch, but if you touch
the area anyway it would be really helpful if you added another patch
for this trivial cleanup and obvious optimization.
next prev parent reply other threads:[~2025-07-15 5:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 17:18 [PATCH v2 0/2] Fix bio splitting in the crypto fallback code Bart Van Assche
2025-07-11 17:18 ` [PATCH v2 1/2] block: Split blk_crypto_fallback_split_bio_if_needed() Bart Van Assche
2025-07-14 11:29 ` Christoph Hellwig
2025-07-14 13:48 ` John Garry
2025-07-14 15:35 ` Bart Van Assche
2025-07-15 5:40 ` Christoph Hellwig [this message]
2025-07-11 17:18 ` [PATCH v2 2/2] block: Rework splitting of encrypted bios Bart Van Assche
2025-07-15 2:18 ` Eric Biggers
2025-07-15 5:37 ` Christoph Hellwig
2025-07-15 6:11 ` Eric Biggers
2025-07-15 6:21 ` Christoph Hellwig
2025-07-16 1:39 ` Damien Le Moal
2025-07-15 5:44 ` Christoph Hellwig
2025-07-14 11:35 ` [PATCH v2 0/2] Fix bio splitting in the crypto fallback code Christoph Hellwig
2025-07-14 15:37 ` Bart Van Assche
2025-07-15 2:05 ` Martin K. Petersen
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=20250715054044.GA18159@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=ebiggers@kernel.org \
--cc=john.g.garry@oracle.com \
--cc=linux-block@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.