Skip to content

nvme_map_user_request() cleanup

Caleb Sander Mateos io-uring linux-nvme lkml 4 versions – Applied

Status from this message: Thanks, applied to nvme for-next. I'll replay this to nvme-6.15 after

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 4 repliesApplied
  2. v33 patches 5 repliesSuperseded
  3. v23 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches0 repliesSuperseded

Changes in v4 from the cover letter

- Preserve the order of blk_mq_free_request() and nvme_passthru_end()
- Add Reviewed-by tags

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3nvme/ioctl: don't warn on vectorized uring_cmd with fixed bufferdrivers/nvme/host/ioctl.c+1 -10 replies
2/3nvme/ioctl: move blk_mq_free_request() out of nvme_map_user_request()drivers/nvme/host/ioctl.c+17 -140 replies
3/3nvme/ioctl: move fixed buffer lookup to nvme_uring_cmd_io()drivers/nvme/host/ioctl.c+24 -213 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJens AxboeChaitanya KulkarniChristoph Hellwig
1/3R-b R-b R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/3] nvme_map_user_request() cleanup

The first commit removes a WARN_ON_ONCE() checking userspace values. The last 2 move code out of nvme_map_user_request() that belongs better in its callers, and move the fixed buffer import before going async. As discussed in [1], this allows an NVMe passthru operation submitted at the same time as a ublk zero-copy buffer unregister operation to succeed even if the initial issue goes async. This can improve performance of userspace applications submitting the operations together like this with a slow fallback path on failure. This is an alternate approach to [2], which moved the fixed buffer import to the io_uring layer.

There will likely be conflicts with the parameter cleanup series Keith posted last month in [3].

The series is based on for-6.15/io_uring, with commit 00817f0f1c45 ("nvme-ioctl: fix leaked requests on mapping error") cherry-picked.

[1]: https://lore.kernel.org/io-uring/[email protected]/T/#u
[2]: https://lore.kernel.org/io-uring/[email protected]/
[3]: https://lore.kernel.org/all/[email protected]/T/#u

v4:
- Preserve the order of blk_mq_free_request() and nvme_passthru_end()
- Add Reviewed-by tags

v3: Move the fixed buffer import before allocating a blk-mq request

v2: Fix iov_iter value passed to nvme_map_user_request()

Caleb Sander Mateos (3):
nvme/ioctl: don't warn on vectorized uring_cmd with fixed buffer nvme/ioctl: move blk_mq_free_request() out of nvme_map_user_request() nvme/ioctl: move fixed buffer lookup to nvme_uring_cmd_io()

 drivers/nvme/host/ioctl.c | 68 +++++++++++++++++++++------------------
 1 file changed, 37 insertions(+), 31 deletions(-)
Signature · 1 line
2.45.2