Skip to content

heap: the mover's OLD mark gets a bit of its own, the first step to moving with the boot heap frozen - #1072

Merged
sims1253 merged 2 commits into
mainfrom
g3/h-mover-old
Nov 29, 2026
Merged

sims1253 merged 2 commits into
mainfrom
g3/h-mover-old

Conversation

@sims1253

Copy link
Copy Markdown
Owner

M1's loader can't be deleted while three checks still need it: rt-ci's young:16 step and the nightly's --full-move and --freeze-check. The moving collector can't run with the boot heap's freeze on, because its "already moved" mark (OLD, for ROBIGO_GC_MOVE=young:N) is the header flag the freeze uses as FROZEN. So the moving modes run with the freeze off. Under the rdb boot that means marking and moving 42k boot objects at every collection, which is too slow, so those steps run under M1.

The council ruled (Fable 5.2, Opus 5.5, Astra 6.2, Sol 6.2; Gemini 4 Neon was out of quota on both routes): make the mover work with the frozen heap now, in three PRs. This is the first. OLD moves to a bit of its own; the refusal to run the mover with the freeze stays until PR 2.

 layout/defs.rs  extra::MOVED = bit 15 of the header's extra word, in TYPE_BLIND (every type map's
                 disjointness assert covers it); env's ESCAPED moves 15 -> 14, free in env's map
 gc/mover.rs     OLD = extra::MOVED (was flags::FROZEN); set_old(); forward_to zeroes an old copy's extra
 gc/freeze.rs    stopping_the_mover_clears_its_old_bit: checks MOVED, and that FROZEN is untouched
 gc.rs           a comment
 tests/heap.rs   a_fresh_object_in_a_dead_copys_slot_is_young

H's appendix suggested a side bitmap per block, because the flags byte is full. The extra word has room once ESCAPED moves, and it avoids the side bitmap's costs:

  • The block header doesn't change (size_of::<Block>() == DATA_OFF; the perf gate).
  • An allocation writes the whole header, so a reused slot starts young with no sweep or retire clears to forget. A bitmap would have needed those.
  • Large objects need no separate home.
  • mark_young's test stays one header load.

Proof:

  • cargo test -p robigo-heap passes, under the dev and quick profiles (five repeated runs of the heap suite).
  • Local gate green on the pre-rebase head efd1eb18f: full scripts/rt-ci.py (32.3 min; young:16 step 7.3 min), --shard debug-assertions (4.8 of 5 min), scripts/lint-job.sh (11/11).

Reviewed with sol-loop: 1 round with gpt-6.2-sol. Sol verdict: approved

Claude Opus 5.5 on behalf of Max

…eze's FROZEN

ROBIGO_GC_MOVE=young:N marked the objects a moving collection copied
with the header flag the boot heap's freeze uses as FROZEN, so the two
could never run together: the moving modes ran with the freeze off and
under M1's loader. OLD is now bit 15 of the header's extra word, which
every type's map leaves free once env's ESCAPED moves to bit 14. An
allocation writes the whole header, so a slot a dead copy leaves starts
young again; forward_to clears an old copy's extra as it clears its
flags. The refusal to run the mover with the freeze stays: lifting it
is the next PR (the council's ruling, PR 1 of 3).
@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: fd6b46b1-22af-4302-b003-e54912db1b73
  • 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

@github-actions github-actions Bot added the size:L 100-499 changed lines outside tests label Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Test delta

added removed net
Rust #[test]s +1 -0 +1

120 changed lines outside tests, 27 in tests: size:L.

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 5 selected item(s).

Comment thread crates/robigo-heap/src/layout/defs.rs Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines outside tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant