|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
One host's live governor state (a slot in the fixed per-host table). More...
#include <mdl_politeness.h>
Data Fields | |
| char | host [k_mdl_gov_host_max] |
| Host key; "" when the slot is free. | |
| int64_t | credit_ms |
| Token-bucket credit, ms of rate. | |
| int64_t | last_ms |
| Wall-ms of the previous scheduled start. | |
| int64_t | earliest_next_ms |
| Backoff / Retry-After gate (mono-ms). | |
| uint16_t | backoff_level |
| Consecutive-throttle exponent. | |
| uint16_t | success_streak |
| Consecutive successes since last drop. | |
| uint16_t | inflight |
| Requests currently in flight. | |
| bool | used |
| Slot occupied. | |
One host's live governor state (a slot in the fixed per-host table).
Keyed by host; an empty used flag marks a free slot. credit_ms is the token bucket measured in milliseconds of accrued rate credit (a request costs one interval); earliest_next_ms is the backoff / Retry-After gate; backoff_level is the consecutive-throttle exponent; inflight is the concurrency counter. All timestamps are on the mdl_now_fn timeline.
Definition at line 215 of file mdl_politeness.h.
| uint16_t mdl_host_rec_t::backoff_level |
Consecutive-throttle exponent.
Definition at line 220 of file mdl_politeness.h.
Referenced by internal_gov_on_success(), internal_gov_on_throttle(), and mdl_governor_peek().
| int64_t mdl_host_rec_t::credit_ms |
Token-bucket credit, ms of rate.
Definition at line 217 of file mdl_politeness.h.
Referenced by internal_gov_get(), and internal_gov_schedule().
| int64_t mdl_host_rec_t::earliest_next_ms |
Backoff / Retry-After gate (mono-ms).
Definition at line 219 of file mdl_politeness.h.
Referenced by internal_gov_get(), internal_gov_on_success(), internal_gov_on_throttle(), internal_gov_schedule(), and mdl_governor_peek().
| char mdl_host_rec_t::host[k_mdl_gov_host_max] |
Host key; "" when the slot is free.
Definition at line 216 of file mdl_politeness.h.
Referenced by internal_gov_find(), internal_gov_get(), and mdl_governor_peek().
| uint16_t mdl_host_rec_t::inflight |
Requests currently in flight.
Definition at line 222 of file mdl_politeness.h.
Referenced by mdl_governor_acquire(), and mdl_governor_release().
| int64_t mdl_host_rec_t::last_ms |
Wall-ms of the previous scheduled start.
Definition at line 218 of file mdl_politeness.h.
Referenced by internal_gov_get(), and internal_gov_schedule().
| uint16_t mdl_host_rec_t::success_streak |
Consecutive successes since last drop.
Definition at line 221 of file mdl_politeness.h.
Referenced by internal_gov_on_success(), and internal_gov_on_throttle().
| bool mdl_host_rec_t::used |
Slot occupied.
Definition at line 223 of file mdl_politeness.h.
Referenced by internal_gov_find(), internal_gov_get(), and mdl_governor_peek().