Skip to content

docs(streaming): correct load_hot_layer's "page cache" backing claim - #118

Open
agourakis82 wants to merge 1 commit into
Edge0-AI:mainfrom
agourakis82:fix/hot-layer-anonymous-memory-doc
Open

agourakis82 wants to merge 1 commit into
Edge0-AI:mainfrom
agourakis82:fix/hot-layer-anonymous-memory-doc

Conversation

@agourakis82

Copy link
Copy Markdown
Contributor

Addresses point 2 of #106 (the README-wording points 1 and 3 were already addressed by the maintainer directly in the issue thread, so this PR is scoped to the uncontested code-doc inaccuracy only).

load_hot_layer()'s docstring described the hot-expert backing store as "page cache" that "survives across requests, counts ZERO toward MLX active." The survives-across-requests and zero-MLX-cost parts are correct, but the backing is built with np.concatenate(rows), which copies — so it's resident anonymous process memory, not mmap'd/file-backed page cache. Unlike page cache, the OS can't reclaim it under memory pressure.

Fix

Corrects the docstring and the matching inline comment further down the same method. No behavior change — documentation only.

Test plan

  • pytest -m 'not slow': 79 passed, 1 skipped (no regressions, as expected for a docs-only change).

load_hot_layer()'s docstring described the hot-expert backing store as
"page cache" that "survives across requests, counts ZERO toward MLX
active" -- true of the zero-MLX-cost and survives-across-requests
parts, but the backing is built with np.concatenate(rows), which
copies. That makes it resident anonymous process memory, not
mmap'd/file-backed page cache: it is not reclaimable by the OS the way
page cache is, and does not shrink under memory pressure the way the
docstring's "page cache" framing implies.

Fixes the misleading description and the matching inline comment
further down the same method. No behavior change.

Addresses point 2 of Edge0-AI#106 (the README wording in points 1 and 3 was
already addressed in the issue thread by the maintainer).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant