Skip to content

[Store] Allow local buffers alongside EGM provider pools - #4859

Merged
ykwd merged 2 commits into
kvcache-ai:mainfrom
neverhook:codex/egm-provider-local-buffer
Oct 27, 2026
Merged

ykwd merged 2 commits into
kvcache-ai:mainfrom
neverhook:codex/egm-provider-local-buffer

Conversation

@neverhook

@neverhook neverhook commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

EGM Provider setup currently rejects a nonzero local_buffer_size, even though the client staging buffer is allocated separately from the global EGM pool. Allow Providers that also use staging APIs to keep an ordinary local buffer.

Remove the local-buffer restriction from EGM configuration parsing and retain the existing client-buffer allocator, local size checks, and NVLink/global-capacity requirements. Extend the existing setup tests for zero and 16 MiB buffers, and update the API documentation.

Related to #2914 and #3335. Searches of open EGM and local_buffer_size PRs found no equivalent change. Transport registration, transfer paths, and cleanup behavior are unchanged.

Suggested Merge Priority

  • P0 — Urgent
  • P1 — High
  • P2 — Normal
  • P3 — Low

Module

  • Mooncake Store (mooncake-store)
  • Integration (mooncake-integration, Python API docstring)
  • Docs

Type of Change

  • Bug fix
  • Documentation update

How Has This Been Tested?

CPU tests use the production configuration and Store implementation on Linux arm64 with GCC 13.3, with CUDA/MNNVL/TENT and etcd disabled. The expanded setup regression fails with the original parser: the 16 MiB cases are rejected before reaching the NVLink transport check. The same cases pass with this change.

cmake --build /tmp/egm-cpu-build --target egm_store_pool_test pybind_client_test client_buffer_test -j4
ctest --test-dir /tmp/egm-cpu-build --output-on-failure -R '^(egm_store_pool_test|client_buffer_test)$'
/tmp/egm-cpu-build/mooncake-store/tests/pybind_client_test --protocol=tcp \
  --gtest_filter='RealClientTest.EgmConfig*:RealClientTest.NvlinkConfig*'

Results: 13 EGM configuration/capacity tests, 16 client-buffer tests, and 4 setup tests passed.

  • Unit tests pass
  • Integration tests pass (if applicable)
  • Manual testing done

Scoped pre-commit checks, changed-line clang-format 20, and make html passed. Both updated documentation pages were checked in the generated HTML. EGM hardware transfers were not rerun.

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 (if applicable)
  • I have added tests to prove my changes are effective
  • For changes >500 LOC: I have filed an RFC issue

AI Assistance Disclosure

  • No AI tools were used
  • AI tools were used (specify below)

OpenAI Codex assisted with implementation, tests, documentation, and review.

Keep the client staging allocator independent of EGM pool configuration. Preserve size and transport checks, extend setup regressions, and document the optional local buffer.

Co-authored-by: OpenAI Codex
Signed-off-by: wugou.cyf <wugou.cyf@antfin.com>
Preserve upstream SSD prefetch configuration and the three-argument EGM parser call. Keep the original PR changes unchanged.

Copy link
Copy Markdown
Contributor Author

@Aionw CI is now green on the latest commit (99957db), including Linux and macOS. Could you check whether anything else is needed before merging? Thanks!

@ykwd
ykwd merged commit 829d95f into kvcache-ai:main Oct 27, 2026
27 checks passed
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 Integration run-ci Store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants