Skip to content

link: record the default hot-text order again on the current runtime (chess peak RSS back to or below c10e0055ee) - #14700

Merged
proggeramlug merged 2 commits into
mainfrom
perf/hot-order-rss-relist
Nov 14, 2026
Merged

proggeramlug merged 2 commits into
mainfrom
perf/hot-order-rss-relist

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Chess peak RSS rose by 256 to 512 KiB on main between c10e005 and fee15e5, and hello2 rose with it. A per-commit bisect (one release build per first-parent commit on qb10) shows four steps:

commit search perft evaluate legal
c10e005 23 464 15 360 15 360 15 344
#14676 (9b6d1d2) +88
#14679 (4d4391a) +256 +256 +256 +248
#14685 (6af7e75) +256
#14690 (0b32e56) +256
fee15e5 23 808 15 872 15 616 15 860

The #14679, #14685 and #14690 steps are placement. They added runtime functions that ordinary programs run at start-up or on the hot path, and those functions were outside the default hot-text order (recorded on 7108c84). Each one maps another 64 KiB window of the runtime text. perf record -e page-faults -d on symbol builds shows 4 more faults on the binary (anonymous faults equal). The first touch of each new window is in AtomTable::replace_from, prune_property_atoms, computed_key_complete, gc_budgeted_step_work_units_inner_with_progress and publish_unbuilt_holder (#14679), the occupancy_max_survivals OnceLock (#14685), and store_proven_own_slot_slow (#14690). None of them was listed.

Change

hot_text_order.txt only. It is recorded again with the hotorder recipe on fee15e5: 309 programs (parity sample, scoreboard, chess x4, hello2; tssrc and skin left out, as in hotorder2), 253 train and 53 held, then scripts/hot_text_order.py build. The previous recording's other keys that still exist (361) follow as a trailing # tier carried class.

The plain re-recording (6 713 keys) won chess back, but it lost hello2: +256 KiB, 4 864 x10. Its start-up functions (ensure_element_shape, js_array_ensure_element_shape_ordinary) run in only one train program, so the two-program threshold drops them, although the old list had them. Variants were measured with --min-programs 1, with and without the carried tier. List plus carried is the only one that is no worse than c10e005 on perft, evaluate, legal and hello2.

Layout only: no IR, object or instruction changes. PERRY_HOT_TEXT_ORDER=off is unchanged.

Numbers (qb10, one session; fee15e5 vs fee15e5 + this list; instructions:u x3 interleaved, peak RSS median of 10 KiB)

workload M instr fee M instr this RSS fee RSS this delta vs c10e005
search 250000 11 478.818 11 478.806 23 808 23 552 -256 +88 (heap, #14676, see below)
perft 4 251.0798 251.0798 15 872 15 104 -768 -256
evaluate 100000 1 187.7409 1 187.7429 15 616 15 104 -512 -256
legal 10000 347.4998 347.5000 15 860 15 344 -516 0
hello2 (x10) 4 608 x5 / 4 864 x5 4 608 x10 0
  • evaluate +2 K is run-to-run noise. Five more interleaved runs give -0.8 K for this branch. callgrind Ir (x86-64-v3 builds) is evaluate 1 205 608 487 vs 1 205 609 524 (-1 037) and perft 254 310 091 vs 254 310 149 (-58).
  • Checksums and PV are equal to reference.txt in 24 of 24 runs. The binary is the same size (9 308 288 B, .text -16 B).
  • Check mode (PERRY_VERIFY_FACTS=1) on chess: compile rc 0, the four workloads rc 0, 0 misses.

Not fixed here: the #14676 search +88 KiB is heap, not layout. The file-backed faults are equal, and the GC arena keeps one more 2 MiB block resident at the peak (one fewer MADV_DONTNEED + MADV_HUGEPAGE pair).

Tests

  • scripts/hot_text_order.py selftest ok. check --require-coverage on the release build: names 7 074 of 7 074 (core 0 missing), smoke outside the hot run 0.07%.
  • cargo test --release -p perry --bin perry -- hot_text_order hot_data_order compile_env: 64 passed. cargo test --release -p perry --test function_order: 6 passed.
  • Not a facts change, so there is no probe line, parity fixture, S0 arm or env switch: the list is data behind the existing PERRY_HOT_TEXT_ORDER switch.

Not run

Full suites, IR census, vf / check-mode corpus, tssrc, Supabase, skin size, parity corpus RSS on/off, the held-out corpus RSS, aarch64 / musl / lld measurement.

Ralph Küpper added 2 commits November 14, 2026 15:42
…(new start-up and hot-path functions were outside the run); the previous recording's other keys stay in a carried tier
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@proggeramlug
proggeramlug merged commit bb4aaf6 into main Nov 14, 2026
98 of 101 checks passed
@proggeramlug
proggeramlug deleted the perf/hot-order-rss-relist branch November 14, 2026 14:48
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