Skip to content

placement, gpu: a host-room refusal names the reading that gave the room, so a BLOOMERY_HOST_ROOM value reads as given - #885

Merged
juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fix-hostroom-refusal-text
Oct 27, 2026
Merged

juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fix-hostroom-refusal-text

Conversation

@juliankang4

Copy link
Copy Markdown
Collaborator

호스트 메모리 room 부족 거절 문구가 room을 준 출처(읽은 값인지 BLOOMERY_HOST_ROOM으로 준 값인지)를 밝히고 그에 맞는 조언을 하도록 고치는 수정입니다.

What and why

When a load was refused for lack of host room, the message said "the host has N B available (MemAvailable, ...)" and advised "Free host memory", even when BLOOMERY_HOST_ROOM had set the room. A user who had set the lever was told to free memory that was never the limit.

Now the refusal states where the room came from. A room this machine read prints its reading (MemAvailable in /proc/meminfo, the cgroup v2 room or vm_statistics64). A room given by BLOOMERY_HOST_ROOM or by the caller prints "given by BLOOMERY_HOST_ROOM or the caller, not read from this machine", and the advice reads "Raise or unset BLOOMERY_HOST_ROOM". The OS-reserve clause says "the room leaves out" instead of naming MemAvailable.

The reading already came from host_available_read. HostNeed::check and HostNeed::grant now take that (u64, HostRead) pair, and HostShort keeps the reading in a Box<HostRead>, so the text comes from HostShort's Display alone. The model load, MTP draft load, node-tier load and the parts loader hand the reading on. The parts read-ahead refusal and shrink line, and the checkpoint pin refusal in the gates, print it the same way.

Release notes: Fixed: a refusal for lack of host memory says whether the room was read from the machine or given by BLOOMERY_HOST_ROOM, and advises raising or unsetting the lever when it was given.

Code shape

  • No second copy. The refusal text is written in one place, HostShort's Display, from the reading host_available_read already returns. Each caller hands it on instead of rebuilding a label.
  • Model code holds only architecture facts. mtp38.rs only hands on the reading it gets from the common owner.
  • Dead code is gone. The hard-coded "(MemAvailable)" in the checkpoint pin refusal is replaced, and load_host no longer reads the arena setting it never used.
  • No silent failure. A room that cannot be read is still a named error.
  • Comments state what is true now.
  • No relaxed gate. No band, tolerance or lint moved.
  • cargo fmt is clean. cargo clippy is clean on bloomery-placement and bloomery-gpu-gates; I did not run it on bloomery-gpu or the lint ratchet.

Duplication found or removed (path:line): none.

What I ran

Tested head ce01312ae61268b349c55a4b84b2b40a0065eed6 on upstream main b9594b6d1ac0da6d63a9d6dd42f7ea85ac739f99.

On a CPU-only Linux machine, the placement library tests:

cargo test -p bloomery-placement --lib
  • test result: ok. 207 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.11s.
  • With the refusal made to drop the reading, host_need_is_refused_past_mem_available fails with exit 101. With a given room made to advise "Free host memory", the same test fails with exit 101.

On an RTX 5090 machine (card below), the parts tests on the card:

bash tools/gate.sh --oxide -p bloomery-gpu --release --lib -- --include-ignored parts::tests
  • test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 430 filtered out; finished in 15.21s. This includes later_reads_use_their_own_peak_under_a_falling_host_room, which checks the given-room label, and hw_a_parts_load_refuses_a_short_host_before_reading.
  • cargo check --workspace --all-targets with the workspace's full feature set finishes with Finished dev profile [unoptimized + debuginfo] target(s) in 42.34s.
  • cargo clippy -p bloomery-gpu-gates -p bloomery-placement exits 0.

The whole GPU library gate on the same card (recipe just gate-gpu-lib, which runs bloomery-gpu lib tests with the held-card tests serialized, then the bloomery-verbs lib tests):

BLOOMERY_BOX_LOCAL=1 just gate-gpu-lib
  • bloomery-gpu lib tests: test result: ok. 426 passed; 0 failed; 0 ignored; 0 measured; 10 filtered out; finished in 31.40s.
  • Held-card tests: test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 426 filtered out; finished in 3.30s.
  • bloomery-verbs lib tests: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s.
  • The run exited rc 0.

I did not run a timed measurement. The change touches only refusal text and its plumbing, not the decode or prefill path. I did not run the other GPU gates or the lint ratchet.

Hardware

| NVIDIA-SMI 595.99.02              Driver Version: 595.99.02      CUDA Version: 13.2     |
|   0  NVIDIA GeForce RTX 5090        Off |   00000000:01:00.0 Off |                  N/A |

The RTX 5090 machine ran the parts tests and the build check. The placement tests ran on a Linux machine with no GPU.

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

…oom, so a BLOOMERY_HOST_ROOM value reads as given

HostNeed::check and HostNeed::grant take the room with its HostRead, and
HostShort carries it: the refusal names MemAvailable, the cgroup v2 room
or vm_statistics64 for a read room, and BLOOMERY_HOST_ROOM for a given
one, with "Raise or unset BLOOMERY_HOST_ROOM" in place of "Free host
memory". The placed load, the MTP draft load, the node tier's arena
grant, the parts load's read-ahead checks and the checkpoint pin check
read the room through host_available_read and pass the reading on.
@github-actions github-actions Bot added gpu The card engine: crates/gpu*, crates/app needs-gpu Changes code a card must check, and carries no gate run on a card placement Placement planning: crates/placement labels Oct 27, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLEAN: the refusal text now has one owner (HostShort's Display), every caller hands on the reading host_available_read already returns, and I found no failure path.

Non-blocking

⚠ Advice names the lever for any HostRead::Given room: workstation.rs:1260. Given also covers a room a gate passes in code (gate_mimo2_e2e.rs:329, placement.rs:4810), where "Raise or unset BLOOMERY_HOST_ROOM" does not apply. The room line says "or the caller", so it is not wrong, and only gates reach it. Split the variant only if a user-facing path starts passing a code-given room.

⚠ No test covers the new reading in load_host: node.rs:475. A mutant that passes HostRead::MemAvailable there instead of read turns no assertion red. The path needs a tier node, so a unit test is costly. A line in the PR body that this site is untested is enough.

Checked

  • Duplicates: 9 new items checked (read test helper, check/grant room tuple, HostShort.read, the Given advice arm, the new Display strings), none duplicated. dryer: 0 pairs.
  • Complexity: crapper flagged nothing. The new match in HostShort::fmt is even growth.
  • Silent failure: 7 sites followed (host_available_read errors in parts.rs, mtp38.rs, model.rs, node.rs, qwen3moe_place.rs). Each still maps the error to a named GpuError or Err. No unwrap_or, .ok() or let _ = added.
  • Hot path: none touched. The Box<HostRead> is built only on a refusal.
  • Tests: host_need_is_refused_past_mem_available protects the advice match at workstation.rs:1258; the mutant "Given arm advises Free host memory" turns it red. later_reads_use_their_own_peak… protects parts.rs:168; a mutant that drops {read} turns it red.
  • Gates: no pin, band, tolerance or lint level moved. Old assertions changed text only.
  • Escape catalog: no pattern matched (no shell files in the diff).
  • Sibling paths: no old refusal text remains; host_available() is still used by NodeCensus::here.

Notes

  • Evidence: the body carries the nvidia-smi line (RTX 5090), both hashes, and the commands with output. Clippy was not run on bloomery-gpu; CI covers it.

Card check: gpu-evidence. This pull request changes crates/gpu-gates/src/bin/shared/qwen3moe_place.rs, crates/gpu/src/arch/qwen3moe/mtp38.rs, crates/gpu/src/host/node.rs … and carries a gate run on the author's card, which counts as verified.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@github-actions github-actions Bot added gpu-evidence Verified on the author's card: the pull request carries the gate run and its output and removed needs-gpu Changes code a card must check, and carries no gate run on a card labels Oct 27, 2026
@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit 9fa510d into midagedev:main Oct 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gpu The card engine: crates/gpu*, crates/app gpu-evidence Verified on the author's card: the pull request carries the gate run and its output placement Placement planning: crates/placement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant