Skip to content

[26.04_linux-nvidia-bos] NVIDIA: SAUCE: nvme-rdma: size NVFS SGL for GPU pages - #642

Closed
sourabgupta3 wants to merge 2 commits into
NVIDIA:26.04_linux-nvidia-bosfrom
sourabgupta3:sg_26.04_linux-nvidia-bos-nvfs-sgl-fix
Closed

sourabgupta3 wants to merge 2 commits into
NVIDIA:26.04_linux-nvidia-bosfrom
sourabgupta3:sg_26.04_linux-nvidia-bos-nvfs-sgl-fix

Conversation

@sourabgupta3

Copy link
Copy Markdown

NVMe/RDMA sizes the request scatterlist from the block layer physical segment count. For GDS I/O, contiguous proxy pages do not guarantee that the corresponding 64K GPU pages are physically contiguous, so the NVFS mapper can require more entries than the block layer reports.

Classify requests using the first page and, for GPU I/O, allocate enough entries for each 64K GPU page plus a possible boundary crossing. Track whether NVFS allocated the table so CPU requests continue to use the existing allocation and mapping path without a second allocation.

NVMe/RDMA sizes the request scatterlist from the block layer physical
segment count. For GDS I/O, contiguous proxy pages do not guarantee
that the corresponding 64K GPU pages are physically contiguous, so
the NVFS mapper can require more entries than the block layer reports.

Use the first request page only to select the allocation size. GPU
requests receive enough entries for each 64K GPU page plus a possible
boundary crossing, while CPU requests retain the normal physical
segment count. All eligible requests still pass through the NVFS
mapper so mixed CPU/GPU requests are rejected.

Keep integrity, special-payload, and non-read/write requests on the
normal block mapping path before inspecting request segments. This
ensures data-less discard bios use their NVMe DSM special payload.

Signed-off-by: Sourab Gupta <sougupta@nvidia.com>
nvidia-fs submits each I/O from one iovec, but the block layer can
merge bios from separate GPU ranges into one request. A request-wide
payload bound loses the independent 64K alignment of each bio and can
underallocate the NVFS scatterlist.

Compute the GPU-page upper bound for every bio and sum the results.
Continue taking the maximum with blk_rq_nr_phys_segments(), preserving
the existing CPU and single-bio paths.

Signed-off-by: Sourab Gupta <sougupta@nvidia.com>
@nirmoy

nirmoy commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

BaseOS Kernel Review

Tip

✅ Review passed

No issues found across the reviewed commits.

Findings: none

🔍 Review artifacts

📦 Build checks — 🟢 4/4 passed

Note

Build reports and debs are retained for 10 days after the PR closes.

  • ⚪ PR explanation: inactive
Review metadata
  • Reviewed head: 022a38e58506
  • Overall status: kernel validation regression
  • Build checks: 4/4 passed

This comment is maintained by BaseOS Reviewer and updated when the GitHub watcher publishes a newer review.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ❌ Errors found

Details
Checking 2 commits...

Cherry-pick digest:
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject                              │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 022a38e58506 │ [SAUCE] nvme-rdma: size nvfs sgl per bio                         │ N/A        │ N/A     │ sougupta                  │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ ad1704502fdb │ [SAUCE] nvme-rdma: size nvfs sgl for gpu pages                   │ N/A        │ N/A     │ sougupta                  │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint: all checks passed.

PR metadata:
E: PR targets 26.04_linux-nvidia-bos but body has no https://bugs.launchpad.net/... link

@jamieNguyenNVIDIA

Copy link
Copy Markdown
Collaborator

Acked-by: Jamie Nguyen <jamien@nvidia.com>

@clsotog

clsotog commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Acked-by: Carol L Soto <csoto@nvidia.com>

@nirmoy nirmoy added has_2_acks and removed help wanted Extra attention is needed labels Oct 9, 2026
@jamieNguyenNVIDIA

Copy link
Copy Markdown
Collaborator

Applied to canonical-resolute nvidia-bos-next:

  • 0d7460d8c47d NVIDIA: SAUCE: nvme-rdma: size NVFS SGL for GPU pages
  • 31c4ef4c9127 NVIDIA: SAUCE: nvme-rdma: size NVFS SGL per bio

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants