pull: copies only where the CPU reads the card slowly, and only while faster #215

Manually merged
github merged 1 commit from gh-pr/215/head into gh-pr/215/base 2026-12-02 19:16:55 +00:00
Owner

@⁠goldfishdev on GitHub · 2026-12-02 19:00 UTC · original
lobomfz:pull/auto-fast-bar → main · +90 −7 · 4 files · 1 commits · merged 2026-12-02 19:02 UTC

Follow-up to #93, built on #173's calibration.

  • um::calibrate_reads stores the faster CPU read speed in pull::CARD_READ_MB_S.
  • Unset VICTORY_CARD_PULL now uses the card's copies only below 1000 MB/s. 0 and 1 still force either way.
  • After 64 MiB of copies, pull compares their measured throughput (PULLED) with the CPU's calibrated speed. If they are not at least 2x faster, copies turn off for the run and log why. This targets the busy-card/RT case reported in #183, where copies ran at 41-79 MB/s against 76-97 MB/s CPU reads.

Tested:

  • ./build.sh check and PROFILE=diag ./build.sh check.
  • A fast-BAR run: calibration 1451-1470 MB/s, chose the processor, copy_ms around 2.0-2.5 ms in the world.
  • Added a unit test for the decision; the local Wine harness exits before running tests, so the #183 hardware case still needs a run.

Not run: the ignored card tests.

**@⁠goldfishdev** on GitHub · 2026-12-02 19:00 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/215) `lobomfz:pull/auto-fast-bar` → `main` · +90 −7 · 4 files · 1 commits · merged 2026-12-02 19:02 UTC Follow-up to #93, built on #173's calibration. - `um::calibrate_reads` stores the faster CPU read speed in `pull::CARD_READ_MB_S`. - Unset `VICTORY_CARD_PULL` now uses the card's copies only below 1000 MB/s. `0` and `1` still force either way. - After 64 MiB of copies, `pull` compares their measured throughput (`PULLED`) with the CPU's calibrated speed. If they are not at least 2x faster, copies turn off for the run and log why. This targets the busy-card/RT case reported in #183, where copies ran at 41-79 MB/s against 76-97 MB/s CPU reads. Tested: - `./build.sh check` and `PROFILE=diag ./build.sh check`. - A fast-BAR run: calibration 1451-1470 MB/s, chose the processor, `copy_ms` around 2.0-2.5 ms in the world. - Added a unit test for the decision; the local Wine harness exits before running tests, so the #183 hardware case still needs a run. Not run: the ignored card tests.
Use the startup read calibration to choose the card's copies, and turn them
off once they have moved 64 MiB if they are not at least twice the CPU's read
speed. Catches the busy-card/RT case where copies run at 41-79 MB/s (#183).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 19:16:53 +00:00
github manually merged commit 8e8d4b6e4d into gh-pr/215/base 2026-12-02 19:16:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.