48typedef enum : uint32_t {
342 const uint32_t* blocks,
375 const uint32_t* blocks,
409 const uint32_t* blocks,
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Virtual-memory object sources – the page-cache storage seam (Layer 1, #147).
ra8_err_t(* ra8_vsource_read_fn)(void *ctx, uint64_t offset, uint8_t *buf, uint32_t len)
Read len bytes at offset from a paged object's backing.
Caller-owned bindings for the block sweep.
One byte-addressed backing store the sweep reads through – the backend DIP seam the #208 hardware leg...
uint64_t backing_bytes
On-medium size of the backing, in bytes.
const uint64_t * src_bytes
Raw medium-byte counter, or NULL if == delivered.
const char * name
Backend name for the report rows.
ra8_vsource_read_fn read
Byte reader over the backing (set by setup).
int(* setup)(cbs_backend_t *be, ra8_vsource_read_fn payload_read, void *payload_ctx, uint32_t blob_bytes, uint32_t block_bytes, cb_sweep_config_t *config)
Build the backing for blob at block_bytes; 0 on success.
void(* teardown)(cbs_backend_t *be)
Release everything setup acquired (idempotent).
void * read_ctx
Context for read (set by setup).
Counting shim around an ra8_vsource_read_fn.
uint64_t bytes
Bytes served through the shim.
uint64_t calls
Read calls forwarded so far.
void * inner_ctx
Context for inner.
ra8_vsource_read_fn inner
Wrapped reader.
Serializable pseudo-text generator cursor.
uint32_t word_index
Selected word or sentinel.
uint32_t word_offset
Byte position in the selected word.
uint8_t phase
Word/separator phase.
uint32_t sentence_words
Words emitted in the current sentence.
Resettable exact pseudo-text byte source with bounded checkpoints.
uint64_t cursor_offset
End offset cached for sequential reads.
const void * checkpoints
Caller-owned generator-state index.
cbs_payload_state_t cursor_state
State at cursor_offset.
uint32_t checkpoint_count
Entries in the index.
One measured (backend, leg, block size) result row.
uint64_t evictions
ra8_vmem evictions.
const char * leg
Workload leg: "seq" or "hot".
uint64_t reads
Reader requests issued.
uint64_t backing_bytes
On-medium backing size at this block size.
uint32_t frames
Cache frames at this size (budget / block).
uint64_t wall_ns
Wall-clock time of the timed loop, in ns.
uint64_t be_calls
Backend read calls (storage commands).
uint32_t block_bytes
Swept block / frame / chunk size in bytes.
uint64_t be_bytes
Bytes delivered to the cache by the backend.
uint64_t misses
ra8_vmem misses.
const char * backend
Backend name (cbs_backend_t.name).
uint64_t hits
ra8_vmem hits.
uint64_t src_bytes
Raw medium bytes moved (compressed for RBKC).
#208 block/frame-size sweep: the byte-size axis the capacity sweep never touches, so the chunked ....
ra8_err_t priv_meter_read(void *ctx, uint64_t offset, uint8_t *buf, uint32_t len)
ra8_vsource_read_fn forwarding through a cbs_meter_t.
int priv_print_hot_table(cb_sink_t *sink, const cbs_row_t *rows, uint32_t nrows, const char *be, const uint32_t *blocks, uint32_t nblocks)
Print one backend's same-block re-read summary table (leg b).
cbs_dim_t
Workload geometry and fixed sweep parameters.
@ k_cbs_hot_reads
Accesses in the same-block re-read leg.
@ k_cbs_bucket_min
Minimum hash-bucket count for tiny caches.
@ k_cbs_ns_per_us
Nanoseconds per microsecond.
@ k_cbs_cache_bytes
1 MiB resident cache budget (constant).
@ k_cbs_seq_passes
Whole-object passes in the seq leg.
@ k_cbs_blob_bytes
8 MiB payload (2^23; all sizes divide it).
@ k_cbs_max_rows
2 backends x 6 sizes x 2 legs.
@ k_cbs_kib
Bytes per KiB (block-size labels).
@ k_cbs_knee_pct
%% of peak throughput that names the knee.
@ k_cbs_default_chunk
#204 .rabook chunk-size default.
@ k_cbs_words_per_dot
Words per sentence in the text filler.
@ k_cbs_req_bytes
Reader request grain (divides every size).
@ k_cbs_ns_per_s
Nanoseconds per second.
int priv_payload_init(cbs_payload_t *payload, void *workspace, size_t capacity)
Build the payload source index into caller-owned storage.
int priv_print_crossover(cb_sink_t *sink, const cbs_row_t *rows, uint32_t nrows, const uint32_t *blocks, uint32_t nblocks)
Name the measured crossover and print the chunk-size recommendation.
int priv_print_row(cb_sink_t *sink, const cbs_row_t *r)
Print one machine-parseable result row (sweep-block key=value ...).
int priv_print_seq_table(cb_sink_t *sink, const cbs_row_t *rows, uint32_t nrows, const char *be, const uint32_t *blocks, uint32_t nblocks)
Print one backend's sequential-scan summary table (leg a).
ra8_err_t priv_payload_read(void *ctx, uint64_t offset, uint8_t *buffer, uint32_t length)
Read exact historical pseudo-text bytes at any bounded offset.
cbs_backend_t * priv_backends(uint32_t *out_count)
Expose the registered sweep backends (the seam the HW leg extends).
size_t priv_payload_workspace_required(void)
Return exact workspace bytes required by the pseudo-text source index.
uint64_t priv_now_ns(void)
Monotonic wall-clock in nanoseconds.
struct cbs_backend cbs_backend_t