|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Directories | |
| inc | |
| src | |
A host benchmark that settles two page-cache sizing questions by measurement rather than argument: which eviction policy and how many frames the cache should hold (#147, whose decision record is SLRU), and how many bytes a frame – and therefore a chunk of the .rabook container – should be (#208, feeding #204). Both sweeps run in CI, so the answers are re-derived rather than remembered.
The capacity sweep re-models the candidate policies over synthetic and captured reader traces; a page there is an abstract key, so it can never say anything about bytes. The block-size sweep is that other axis, and it is what makes the number evidence rather than opinion: it drives the real ra8_vmem and ra8_vsource stack with frame_bytes set to each swept size, not a model of them.
A backend implements the cbs_backend_t seam – a setup/teardown pair that publishes an ra8_vsource_read_fn, exactly what ra8_vsource_add_paged consumes. Two synthetic host backends ship in-tree: a deterministic payload source, which measures the harness floor with no container decode, and a real RBKC chunked .rabook with one zlib stream per chunk (the same wrapping epub_compile emits), served through the same bounded header/table/offset rules and the same inflate path the firmware reader uses. Every miss on that one pays a genuine inflate of exactly one chunk, so the sweep measures decompress-cost-per-miss against chunk size – the number that actually picks the chunk size – and not raw byte moves.
SD-over-SPI numbers are a bench follow-up; the seam exists so a backend issuing real card reads, or one binding the landed ra8_cache_store from closed issue #201 to OSPI / NAND, plugs in without touching the sweep core.
Output is one machine-parseable row per backend, leg and size, followed by human summary tables and the measured crossover. The durable findings so far: