Skip to content

Commit bec8cd2

Browse files
committed
arena: reuse certified empty spares without repeated sweep work
1 parent d680421 commit bec8cd2

180 files changed

Lines changed: 8880 additions & 54 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Empty reclaimed arena certificate and reuse evidence
2+
3+
The final design and validation audit is
4+
`notes/arena-empty-reclaimed-reuse-2026-09-05.md`.
5+
6+
`reuse-v2/` contains the final separate-atomic-head candidate, its matched
7+
runtime-input manifest, final build/fixture/TSan results, settled accounting
8+
control, layout probe, and all 20 primary performance processes. Every final
9+
process completed. `performance-summary.json` derives from the raw stdout;
10+
the original harness reports best-of-five inner rounds, while the surrounding
11+
script runs three fresh filtered pairs and seven fresh post-insertion pairs.
12+
13+
Root-level performance files and `negative-v1-*` identify the rejected first
14+
revision. It was faster but retained 329→853 arenas across five closure rounds.
15+
Its deterministic generic-allocation and typed-pair controls each chose a fresh
16+
mapping despite two available real spares. The final revision keeps exactly four
17+
arenas across 32 cycles of each control and 320 across all five real closure
18+
rounds. The proposed interior-link/tail scheme was rejected before implementation
19+
because it would race concurrent GC publication and owner adoption.
20+
21+
Both A/B revisions compare against the same immutable normal baseline,
22+
`/tmp/lj-gc-jit-combined-20260905-6cxpl6mp/normal`. It predates the final public
23+
MARK-scope repair and later scalar-read changes. Every tracked runtime input
24+
matches each candidate except arena C/header. Local paths and exact binary/source
25+
hashes are in the metadata; the temporary trees and binaries are not committed.
26+
27+
All measurements keep GC enabled and JIT on, pin processes to CPU 30, alternate
28+
the order within fresh pairs, and preserve a 45-second process bound. CPU 30 has
29+
no SMT sibling and uses the performance governor; frequency is not fixed. Other
30+
agents ran functional work on CPUs 0–15. Own validation overlapped the diagnostic
31+
pair but had ended before the final primary pairs.
32+
33+
`gcdiag.c` is a separate native frontend linked against each unchanged static
34+
archive. It reads allocator lists only from the main owner with no GC workers or
35+
MT execution, and snapshots outside timing. The settled harness adds an explicit
36+
collection after each closure round so retained physical capacity can be checked
37+
alongside live-byte and cycle counters. The final frontend counts both reclaimed
38+
heads. Command arrays, environment, exit status, wall/CPU time and partial output
39+
are retained in the JSON records. Copy evidence before rerunning the scripts,
40+
which write their output beside themselves.
41+
42+
The initial standalone build's runtime-assertion-helper link error and a later
43+
new-fixture HugeTab initialization failure are retained with their corrections;
44+
neither is omitted from the audit. TSan demotes only GCC's known unsupported
45+
atomic-fence instrumentation warning. No host settings were changed.

‎bench/arena-empty-reclaimed-2026-09-05/after-insertion-01-after.stderr‎

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
benchmark total_s ns/op
2+
tab_insert_newkey 0.3574 1786.75
3+
closures_upval 0.7799 1559.77

‎bench/arena-empty-reclaimed-2026-09-05/after-insertion-01-before.stderr‎

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
benchmark total_s ns/op
2+
tab_insert_newkey 0.3670 1834.86
3+
closures_upval 1.9940 3987.91

‎bench/arena-empty-reclaimed-2026-09-05/after-insertion-02-after.stderr‎

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
benchmark total_s ns/op
2+
tab_insert_newkey 0.3602 1801.20
3+
closures_upval 0.7796 1559.24

‎bench/arena-empty-reclaimed-2026-09-05/after-insertion-02-before.stderr‎

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
benchmark total_s ns/op
2+
tab_insert_newkey 0.3672 1835.92
3+
closures_upval 2.0180 4036.03

‎bench/arena-empty-reclaimed-2026-09-05/after-insertion-03-after.stderr‎

Whitespace-only changes.

0 commit comments

Comments
 (0)