Skip to content

fix(nb1): use coherent btop CPU denominator#396

Merged
ryanbreen merged 1 commit into
mainfrom
fix/nb1-cpu-accounting
May 31, 2026
Merged

fix(nb1): use coherent btop CPU denominator#396
ryanbreen merged 1 commit into
mainfrom
fix/nb1-cpu-accounting

Conversation

@ryanbreen
Copy link
Copy Markdown
Owner

Summary

  • NB-1b verdict: PURE ARTIFACT, not a real two-core burn.
  • Parallels /proc/stat idle-window deltas show CPU0 busy 28/2555 ticks (1.1%) and CPU2 busy 46/3470 ticks (1.3%); ARM64 idle paths are wfi-based.
  • Fix btop process CPU accounting to read process ticks first, then use one coherent /proc/stat cpu_capacity_ticks/cpu_online snapshot for all process deltas.
  • No timer, syscall, or interrupt hot-path files changed.

Evidence

  • turn75-artifacts/nb1-groundtruth-and-fix-summary.txt
  • turn75-artifacts/parallels-nb1-groundtruth.serial.log
  • turn75-artifacts/parallels-nb1-after-fresh.serial.log
  • turn75-artifacts/parallels-nb1-after-fresh.screenshot.png
  • turn75-artifacts/final-userspace-aarch64-build-v2.log
  • turn75-artifacts/final-kernel-release-build-v2.log

Validation

  • Fresh Parallels ARM64 run rebuilt userspace/ext2; btop.elf installed at 294624 bytes.
  • Fresh after run: max per-core 5%; max process 28.7% (bwm actively compositing), btop max 16.9%, heartbeat max 2.7%; no >=100.0% process CPU samples.
  • Fault scan clean: no SOFT LOCKUP, CPU0 REGRESSION, DATA_ABORT, FATAL, panic, warning, or error matches.
  • Final aarch64 userspace build warning/error grep empty.
  • Final release kernel build warning/error grep empty.

NB-1b verdict: pure accounting artifact, not real two-core burn. Parallels procfs idle deltas show CPU0/CPU2 near idle/wfi while the inflated btop process percentages came from denominator sampling.

Use one post-process /proc/stat cpu_capacity_ticks snapshot for all process CPU deltas so the denominator is core-aware and newer than the per-PID tick samples.

Co-authored-by: Ryan Breen <ryan@breen.com>

Co-authored-by: Claude Code <noreply@anthropic.com>
@ryanbreen ryanbreen merged commit ab400a6 into main May 31, 2026
@ryanbreen ryanbreen deleted the fix/nb1-cpu-accounting branch May 31, 2026 05:31
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