From: Keith Busch <kbusch@kernel.org>
To: Chaitanya Kulkarni <ckulkarnilinux@gmail.com>
Cc: linux-block@vger.kernel.org, axboe@kernel.dk, hch@lst.de,
kch@nvidia.com, dlemoal@kernel.org
Subject: Re: [PATCH V2] blk-mq: add blk_rq_nr_bvec() helper
Date: Tue, 11 Nov 2025 22:08:25 -0500 [thread overview]
Message-ID: <aRP6KdADdbnhwwrj@kbusch-mbp> (raw)
In-Reply-To: <20251111232252.24941-1-ckulkarnilinux@gmail.com>
On Tue, Nov 11, 2025 at 03:22:52PM -0800, Chaitanya Kulkarni wrote:
> This patch also provides a clear API to avoid any potential misuse of
> blk_nr_phys_segments() for calculating the bvecs since, one bvec can
> have more than one segments and use of blk_nr_phys_segments() can
> lead to extra memory allocation :-
Perhaps blk_nr_phys_segments is misnamed as it represents device
segments, not physical host memory segments. Instead of rewalking to
calculate physical segments, maybe just introduce a new field into the
request so that we can save both the physical and device segments to
avoid having to repeatedly rewalk the same list. There is an ongoing
effort to avoid such repeated work.
next prev parent reply other threads:[~2025-11-12 3:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 23:22 [PATCH V2] blk-mq: add blk_rq_nr_bvec() helper Chaitanya Kulkarni
2025-11-12 3:08 ` Keith Busch [this message]
2025-11-12 4:11 ` Chaitanya Kulkarni
2025-11-12 4:49 ` Ming Lei
2025-11-12 5:02 ` Chaitanya Kulkarni
2025-11-12 14:00 ` Jens Axboe
2025-11-12 16:10 ` Chaitanya Kulkarni
2025-12-01 9:54 ` Niklas Cassel
2025-12-02 0:50 ` Chaitanya Kulkarni
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=aRP6KdADdbnhwwrj@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=ckulkarnilinux@gmail.com \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=kch@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox