fix(tune): runtime HugePages reservation is grow-only (#328) - #329
Merged
Conversation
tune_kernel wrote the miner's computed requirement to vm.nr_hugepages absolutely, which shrinks a pool another consumer already reserved (a co-hosted pithead stack's p2pool/monerod share the same 2MB pool) down to its in-use floor — zero free pages on both sides, measured live on the pithead#797 appliance bench. The write is now availability-based: pages the miner can draw on = HugePages_Free + whatever a running miner already holds (it re-uses its pages across a restart). The pool grows by the shortfall only and never shrinks. Fresh single-purpose rigs see the same reservation as before; re-runs that find enough available write nothing. This is the runtime half of #305's co-resident keep-existing guard. The setup --dry-run plan previews the same decision from the same availability check. Closes #328 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ge branches Three lines diff-cover flagged: the real-MainPID HugetlbPages read (now exercised via a stub systemctl reporting a live pid), the no-proposed-grub 3072 fallback (now asserted grow-only too), and the dry-run plan's covered-pool wording. The probe also always prints a number now — a status file without a HugetlbPages line previously produced empty output. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
tune_kernel's runtime sysctl wrote the miner's computed requirement absolutely, shrinking a pool another consumer already reserved (a co-hosted Pithead stack's p2pool/monerod live in the same 2MB pool) down to its in-use floor — zero free pages on both sides, measured live during the pithead#797 R0 appliance recon (details in #328).Now the write is availability-based and grow-only: pages the miner can draw on =
HugePages_Free+ pages a running miner already holds; the pool grows by the shortfall only and never shrinks. This is the runtime half of #305's co-resident keep-existing guard, and it applies with or withouthugepages_reserve_extra_mb.setup --dry-runpreviews the same decision via the same availability check.Verified
HugePages pool already covers the miner (1552 of 141 pages available; pool: 1444) — leaving it as-is; the miner stayed active throughout.Closes #328
🤖 Generated with Claude Code