upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/opus_decoder/leonida_opus_decoder.h
diff options
context:
space:
mode:
authorQemmHD <290605352+QemmHD@users.noreply.github.com>2026-11-25 16:05:35 -0500
committerQemmHD <290605352+QemmHD@users.noreply.github.com>2026-11-25 16:35:47 -0500
commit6b09de493cef367f2fd48c1e73583a277732c9ff (patch)
tree610a6796cc52d4d4aa5b5adf302506d358e9ac64 /runtime/opus_decoder/leonida_opus_decoder.h
parentdb1a22d290f5e86fff9282fce3d4e02e788b05b4 (diff)
dstorage: reads into physical pages wait for the title's Submitclaude/dstorage-hold-page-reads
A queue with auto-submit on submits itself once the entries enqueued since the last submit reach half its capacity. A request whose destination is a physical page list names its pages through DestinationPageArray, a pointer into the title's own page-number table, and the worker reads that table only when the request runs (page_transfer). The title fills the page table just before Submit. So a read started by the self-submit found page 0 (the entry failed) or the number the slot held before (the data landed in a page that now belongs to something else, with no error). A self-submit now stops at the first read into physical pages. That read and every entry behind it wait for the title's Submit, in order, so a status entry, fence or event behind a held read still comes after it. A full queue submits the held entries too, since the title cannot call Submit while it waits in an enqueue. Close submits everything, as before. A hold also ends after LEONIDA_DSTORAGE_HOLD_MS (2000 ms unless set; 0 means no limit), so a path that never calls Submit cannot stall for good. LEONIDA_DSTORAGE_HOLD_PAGES=0 restores the old self-submit of everything. "[rt] ds-hold" counts self-submits, held reads, full-queue and timed releases, and destination lists that named page 0 when written. It is printed at each power of two of the counter that moved (runtime/src/dstorage_hold.h). The idea is from Marvisak/VIctory eddde73; it also appears in fxceless/victory-fork 79cfdd9. Written anew for this queue. Test: dstorage_test, test_page_reads_wait_for_submit: a list changed between the self-submit and Submit, a list still empty at the self-submit, a full queue, the default and an explicit time limit, no limit, the switch, and the page-0 counter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
Diffstat (limited to 'runtime/opus_decoder/leonida_opus_decoder.h')
0 files changed, 0 insertions, 0 deletions