Skip to content

[Bugfix][Store] Register external buffers with SPDK for NoF - #4539

Open
cage-goat wants to merge 1 commit into
kvcache-ai:mainfrom
cage-goat:nof-l1-spdk-registration
Open

cage-goat wants to merge 1 commit into
kvcache-ai:mainfrom
cage-goat:nof-l1-spdk-registration

Conversation

@cage-goat

@cage-goat cage-goat commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3131

Description

External buffers registered through register_buffer() were registered with the Transfer Engine but remained invisible to SPDK, causing NoF-over-RDMA I/O to fail with No translation for ptr.

This change adds SPDK registration and unregistration for external host buffers when USE_NOF and MC_STORE_REGISTER_SPDK=1 are enabled. Buffers must be hugepage-backed, with 2 MiB-aligned addresses and sizes.

Addresses the registration gap reported in #3131. This is a focused fix using the existing SpdkWrapper, independent of the broader NoF/SPDK refactoring in #3424.

Module

  • Mooncake Store (mooncake-store)
  • Docs

Type of Change

  • Bug fix
  • Documentation update

How Has This Been Tested?

Manual validation used a single RDMA host with an 8 GiB SPDK Malloc
bdev (4 KiB blocks). LMCache included #5393 and the replica-config
forwarding patch, with pure-NoF replicas (replica_num=0,
nof_replica_num=1).

  1. Ran lmcache bench l2 with hugepages, 32 keys, 256 KiB per key,
    3 rounds, and --no-skip-verify.
  2. With MC_STORE_REGISTER_SPDK=0, reproduced No translation for ptr.
    With it enabled, all 96 stores and 96 loads succeeded, and all
    32 keys in the final round passed data verification.
  3. Traced SPDK registration and unregistration of the 16 MiB benchmark
    buffer; both returned 0.
  4. Ran vLLM + LMCache MP in lmcache_driven mode with a 2 GiB hugepage
    L1. Inference succeeded and stored 16 KV chunks (448 MiB) in NoF.

Checklist

  • I have performed a self-review of my own code
  • I have formatted my code using ./scripts/code_format.sh
  • I have run pre-commit on the files changed in this PR and all hooks pass
  • I have updated the documentation
  • I have added tests to prove my changes are effective

AI Assistance Disclosure

  • AI tools were used

OpenAI Codex assisted with implementation, review, formatting, and validation.

Register external host buffers with SPDK when USE_NOF and
MC_STORE_REGISTER_SPDK=1 are enabled, and unregister them on release.
Require 2 MiB-aligned addresses and sizes.

Signed-off-by: Cage Chen <cage@arcfra.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation run-ci Store labels Oct 9, 2026
@hgichon

hgichon commented Nov 12, 2026

Copy link
Copy Markdown

Test results for the same approach (SPDK registration in register_buffer), in case they help review.

Setup: vLLM + LMCache (mooncakestore connector, replica_num=0, nof_replica_num=1), 4 NoF targets over NVMe/RDMA, SPDK v23.01.1, base 342c8ae.

Metric NVMe/TCP (no registration needed) NVMe/RDMA (with registration)
LMCache TTFT, 32K-token prompt, cache hit 1.014 s 0.534 s
KV retrieve throughput ~4 GB/s ~8 GB/s
Store put / get — 8.54 / 10.13 GB/s

This branch has not been deployed

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

Labels

documentation Improvements or additions to documentation run-ci Store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: NoF 写入失败:spdk_rdma_get_translation: No translation for ptr 是否是我配置的不对导致的这个问题?

2 participants