You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Process-GC parallel mark (STW-exempt): with GCRY_PARALLEL_MARK=N / parallel_mark_workers > 1, helpers are raw LibC.pthread_create threads (not Crystal::Thread), so stop_world does not suspend them. They steal grey objects under @mark_lock (parallel_mark_stolen). Fork child abandons the pool via reset_mark_workers_after_fork.
Library-heap parallel mark: with parallel_mark_workers > 1 and stop_the_world == false, helper Threads steal grey objects (parallel_mark_stolen).
Stack scrubbing (no Crystal patch):GCRY_CLEAR_STACK=1 zeros a window below SP (skips x86_64 red zone; default every 16 allocs) without calling Fiber/Thread APIs; GCRY_SCRUB_FIBERS=1 zeros a capped window below each parked fiber's saved SP before mark (not the full unused stack — that faults pages in and blows RSS). Metrics: clear_stack_* / fiber_scrub_* (json_stats + Prometheus). Not stack maps; measure before enabling as default.
Richer Gcry::Observability.json_stats (phase timers, mapped/live bytes, TLAB, parallel-mark, barrier) — Kemal /gc-stats uses it.
Prometheus: TLAB, parallel-mark, phase, layout, SP clamp, barrier, size-class live / released chunk gauges; gcry_clear_stack_* / gcry_fiber_scrub_*.
README / HARDENING / POLICY: GCRY_PARALLEL_MARK is real for process GC (pthread steals), not counter-only — and labeled experimental / measure first (Kemal /json + acikturkiye /api/v1/ thr regressed vs N=1 in same-host wrk).
Dogfood docs: docs/ACIKTURKIYE.md + docs/API.md point at Observability routes; acikturkiye make run-demo-gcry / README GC section.
Same-host Kemal (0.9.0 cut, median of 3, scrub off): /~89% of Boehm; /json~92%; post-GC RSS ~0.97× — see docs/PERF.md.
Same-host acikturkiye /api/v1/ (median of 3, scrub off): thr trial-median ~93%; post-GC RSS ~2.84× (was ~3.20× at 0.8.0) — see docs/ACIKTURKIYE.md.
Fixed
clear_stack aarch64 SEGV: wipe used approximate pointerof(local) as SP (mid-frame). With no x86_64 red zone that zeroed the leaf frame (Invalid memory access @ 0x0 on CI test (aarch64 native)). Now reads hardware SP (Roots.hardware_stack_pointer) plus a leaf margin.