From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
Kanchan Joshi <joshi.k@samsung.com>,
axboe@kernel.dk, linux-block@vger.kernel.org,
martin.petersen@oracle.com, anuj20.g@samsung.com
Subject: Re: [PATCH] block: streamline meta bounce buffer handling
Date: Tue, 7 May 2024 07:45:47 +0200 [thread overview]
Message-ID: <20240507054547.GA31832@lst.de> (raw)
In-Reply-To: <Zjk_Nnn-T0SgWoNv@kbusch-mbp>
On Mon, May 06, 2024 at 02:36:06PM -0600, Keith Busch wrote:
> Unlike blk-map, the integrity user buffer will fallback to a copy if the
> ubuf has too many segments, where blk_rq_map_user() fails with EINVAL.
>
> For user integrity, we have to pin the buffer anyway to get the true
> segment count and check against the queue limits, so the copy to/from
> takes advantage of that needed pin.
Can we document that somewhere please?
> That EINVAL has been the source of a lot of "bugs" where we have to
> explain why huge pages are necessary for largish (>512k) transfer nvme
> passthrough commands. It might be a nice feature if blk_rq_map_user()
> behaved like blk_integrity_map_user() for that condition.
Who wants to sign up for it? If we also clean up the mess in sg/st
with their own allocated pages that would have the potential to
significantly simply this code.
> > Sort of related to that is that this does driver the copy to user and
> > unpin from bio_integrity_free, which is a low-level routine. It really
> > should be driven from the highlevel blk-map code that is the I/O
> > submitter, just like the data side. Shoe-horning uaccess into the
> > low-level block layer plumbing is just going to get us into trouble.
>
> Okay, I think I see what you're saying. We can make the existing use
> more like the blk-map code for callers using struct request. The
> proposed iouring generic read/write user metadata would need something
> different, but looks reasonable.
The important point is that the unpin and copy back should be driven by
the submitter side, not matter if it is bio or request based.
next prev parent reply other threads:[~2024-05-07 5:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240506051751epcas5p1ed84e21495e12c7bf41e94827aa85e33@epcas5p1.samsung.com>
2024-05-06 5:10 ` [PATCH] block: streamline meta bounce buffer handling Kanchan Joshi
2024-05-06 6:05 ` Christoph Hellwig
2024-05-06 12:46 ` Kanchan Joshi
2024-05-06 14:56 ` Christoph Hellwig
2024-05-06 20:36 ` Keith Busch
2024-05-07 5:45 ` Christoph Hellwig [this message]
2024-05-24 10:28 ` Kanchan Joshi
2024-05-28 7:59 ` Christoph Hellwig
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=20240507054547.GA31832@lst.de \
--to=hch@lst.de \
--cc=anuj20.g@samsung.com \
--cc=axboe@kernel.dk \
--cc=joshi.k@samsung.com \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.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;
as well as URLs for NNTP newsgroup(s).