ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_keycache_t Struct Reference

Cache engine state (caller-owned; treat as private). More...

#include <ra8_keycache.h>

Collaboration diagram for ra8_keycache_t:

Data Fields

ra8_keycache_cfg_t cfg
 Configuration (copied at init).
int32_t pb_head
 Probationary MRU cell, or -1.
int32_t pb_tail
 Probationary LRU cell, or -1.
int32_t pt_head
 Protected MRU cell, or -1 (SLRU only).
int32_t pt_tail
 Protected LRU cell, or -1 (SLRU only).
uint32_t protected_count
 Cells in the protected segment.
uint32_t protected_cap
 Protected-segment capacity (0 = LRU).
uint32_t hits
 Get hits so far.
uint32_t misses
 Get misses so far.
uint32_t evictions
 Entries evicted so far.

Detailed Description

Cache engine state (caller-owned; treat as private).

Under LRU only the probationary list is used (it is the single recency list) and the protected segment stays empty; under SLRU both segments are live. protected_cap is 0 under LRU.

Invariant
Every valid cell is reachable from exactly one hash bucket.
Every cell is a member of exactly one segment list.
protected_count <= protected_cap <= cell_count.
Since
0.1.0

Definition at line 217 of file ra8_keycache.h.

Field Documentation

◆ cfg

◆ evictions

uint32_t ra8_keycache_t::evictions

Entries evicted so far.

Definition at line 227 of file ra8_keycache.h.

Referenced by internal_miss(), and ra8_keycache_stats().

◆ hits

uint32_t ra8_keycache_t::hits

Get hits so far.

Definition at line 225 of file ra8_keycache.h.

Referenced by ra8_keycache_get(), and ra8_keycache_stats().

◆ misses

uint32_t ra8_keycache_t::misses

Get misses so far.

Definition at line 226 of file ra8_keycache.h.

Referenced by ra8_keycache_get(), and ra8_keycache_stats().

◆ pb_head

int32_t ra8_keycache_t::pb_head

Probationary MRU cell, or -1.

Definition at line 219 of file ra8_keycache.h.

Referenced by internal_access(), internal_miss(), internal_seed_cells(), and internal_slru_access().

◆ pb_tail

int32_t ra8_keycache_t::pb_tail

Probationary LRU cell, or -1.

Definition at line 220 of file ra8_keycache.h.

Referenced by internal_access(), internal_miss(), internal_pick_victim(), internal_seed_cells(), and internal_slru_access().

◆ protected_cap

uint32_t ra8_keycache_t::protected_cap

Protected-segment capacity (0 = LRU).

Definition at line 224 of file ra8_keycache.h.

Referenced by internal_slru_access(), ra8_keycache_init(), and ra8_vmem_init().

◆ protected_count

uint32_t ra8_keycache_t::protected_count

Cells in the protected segment.

Definition at line 223 of file ra8_keycache.h.

Referenced by internal_miss(), and internal_slru_access().

◆ pt_head

int32_t ra8_keycache_t::pt_head

Protected MRU cell, or -1 (SLRU only).

Definition at line 221 of file ra8_keycache.h.

Referenced by internal_miss(), internal_seed_cells(), and internal_slru_access().

◆ pt_tail

int32_t ra8_keycache_t::pt_tail

Protected LRU cell, or -1 (SLRU only).

Definition at line 222 of file ra8_keycache.h.

Referenced by internal_miss(), internal_pick_victim(), internal_seed_cells(), and internal_slru_access().


The documentation for this struct was generated from the following file: