Skip to content

cpu: idle detection/park as a selectable feature (idle-pause, off by default)#30

Merged
techomancer merged 1 commit into
techomancer:mainfrom
hanshuebner:pr/idle-pause-feature
May 31, 2026
Merged

cpu: idle detection/park as a selectable feature (idle-pause, off by default)#30
techomancer merged 1 commit into
techomancer:mainfrom
hanshuebner:pr/idle-pause-feature

Conversation

@hanshuebner
Copy link
Copy Markdown
Contributor

Puts the guest-idle-loop detection that sleeps the CPU thread (instead of spinning the host core) behind a cargo feature, idle-pause, rather than always compiling it in.

  • Off by default (CPU thread spins) — simplest for deterministic-clock and raw-benchmark builds. Opt in with --features idle-pause.
  • When compiled in, the existing IRIS_NO_IDLE env var still disables it at runtime.
  • Gated with #[cfg(feature = "idle-pause")] in mips_exec.rs; no dead code or unused-variable warnings when off.

Rebased cleanly onto current main (the Cargo.toml feature-list addition sits alongside the r5k cache features; default = ["tlbvmap"] unchanged).

🤖 Generated with Claude Code

…y default)

The guest-idle-loop detection that sleeps the CPU thread instead of spinning the
host core is now behind the `idle-pause` cargo feature rather than always
compiled in. Off by default (CPU spins; simplest for deterministic-clock and
raw-benchmark builds); opt in with --features idle-pause. When compiled in, the
IRIS_NO_IDLE env var still disables it at runtime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@techomancer techomancer merged commit 66ade16 into techomancer:main May 31, 2026
1 check passed
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.

2 participants