diff options
| author | NotRexed <therealnothingfn@gmail.com> | 2026-11-27 09:46:01 -0500 |
|---|---|---|
| committer | NotRexed <therealnothingfn@gmail.com> | 2026-11-27 09:46:01 -0500 |
| commit | 0f54ce527269796a4b62ef04ec95d9031ae6dbec (patch) | |
| tree | d40358210502dfbf1f66a8107f5b8e44f64bfaf7 /docs/lua-modding.md | |
| parent | 64330ac8ae4c3d80c132c762fa9ca3cda3de5240 (diff) | |
Memory remaps: shorter holds of title memory, measured; fill-title and reflection caps switchable by A/B
Texture refreshes and read-backs wait while the runtime changes a mapping, and the
submitting thread waits for them. New frame-line counter (changes per frame, time waited for
reads, time held, longest hold) and a log of holds of 20 ms or more with their caller: in the
world, single holds of 23-69 ms came from map_alias (the GPU's page-mapping copies), and one
frame of 182 ms held 110 ms (refreshes waited 116 ms of it).
- map_alias maps 16 pages under one taking (LEONIDA_ALIAS_CHUNK=<pages>, 0: the whole range):
with LEONIDA_MAP_THREADS=1 it mapped a page after the other at 0.2-4 ms each, holding all.
Between chunks every page is mapped, old or new, so no read in place meets a gap.
- The thread that changes a mapping runs at the highest priority while it holds title memory
(LEONIDA_REMAP_BOOST=0: its own), so the twelve busy threads do not put it aside mid-hold.
- A/B over moves (30 s phases, one of each of the 8 combinations with LEONIDA_PLACED_ORDER):
medians 94-100 ms, p90 132-138 for all; the long holds are rare, the average does not move.
LEONIDA_PLACED_ORDER left off: the waits behind placed copies were as long with it.
- LEONIDA_FILL_TITLE and LEONIDA_REFLECT_MOST answer LEONIDA_AB (diagnostics builds).
Unit tests: the six page-mapping tests of xmem pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/lua-modding.md')
0 files changed, 0 insertions, 0 deletions