docs(roadmap): split v0.6 into up-next / later; add RFC 004 summary
Up next: channel mutex migration, named registry, gen_server call timeout. Later: RFC 004 (tunable scheduler idle policy), unbounded slab, handle_info, IO fd hygiene, arm-port.
This commit is contained in:
+36
-26
@@ -104,9 +104,7 @@ precondition.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## v0.6 — Fast follows & open tracks
|
## v0.6 — Up next
|
||||||
|
|
||||||
Priority order within the cycle; each item is its own commit.
|
|
||||||
|
|
||||||
### 1. Channel mutex migration (first change)
|
### 1. Channel mutex migration (first change)
|
||||||
`channel::Inner<T>` holds a `std::sync::Mutex`. Phase 2 surfaced a sharp
|
`channel::Inner<T>` holds a `std::sync::Mutex`. Phase 2 surfaced a sharp
|
||||||
@@ -126,37 +124,49 @@ keep it cheap/pure.
|
|||||||
`HashMap<String, Pid>` in `SharedState`, guarded by the shared lock. No
|
`HashMap<String, Pid>` in `SharedState`, guarded by the shared lock. No
|
||||||
architecture changes; can land immediately after #1.
|
architecture changes; can land immediately after #1.
|
||||||
|
|
||||||
### 3. gen_server: handle_info + call timeout
|
### 3. gen_server: call timeout
|
||||||
- `handle_info`: needs a cross-channel mailbox merge (call/cast inbox +
|
`call` with a deadline — monitor the server, wait reply-or-Down-or-deadline,
|
||||||
out-of-band signals). The still-unmade decision: whether to introduce a
|
then `demonitor`+drop so a timed-out call leaks no registration. Requires a
|
||||||
unified per-actor mailbox or keep per-channel `recv_match` composition.
|
per-`recv` deadline / `Signal::Timeout` primitive that doesn't exist yet.
|
||||||
- Call timeout: `call` with a deadline — monitor the server, wait
|
(`handle_info` deferred — needs cross-channel mailbox merge; see Later.)
|
||||||
reply-or-Down-or-deadline, then `demonitor`+drop so a timed-out call leaks
|
|
||||||
no registration. Requires a per-`recv` deadline / `Signal::Timeout` primitive
|
|
||||||
that doesn't exist yet.
|
|
||||||
|
|
||||||
These two can land independently; call timeout is smaller and more useful
|
---
|
||||||
first.
|
|
||||||
|
|
||||||
### 4. Unbounded / configurable-bounded actor count
|
## Later
|
||||||
v0.5 ships a fixed slab with a loud assert (`Config::max_actors(n)`, default
|
|
||||||
16 384). Revisit with a segmented slab (array of `AtomicPtr<Segment>`, doubling
|
|
||||||
segment sizes, append-only) once the cap is actually hit or a workload demands
|
|
||||||
it. Do not let the fixed cap calcify into an assumption.
|
|
||||||
|
|
||||||
### 5. Idle-wakeup eventcount
|
### Tunable scheduler idle policy (RFC 004)
|
||||||
Idle scheduler threads currently poll-sleep at 100 µs. A futex-based eventcount
|
Today idle schedulers fall back to `thread::sleep(100µs)`, putting ~100µs
|
||||||
would reduce idle latency. Defer until benches show it matters.
|
worst-case latency on every cross-thread actor handoff. RFC 004 specifies a
|
||||||
|
bounded spinning-worker policy (Go/Tokio model): idle schedulers spin on a
|
||||||
|
cheap atomic for a configurable budget before parking, so a burst of work is
|
||||||
|
picked up in cache-coherency time rather than after a kernel reschedule.
|
||||||
|
|
||||||
### 6. IO fd hygiene on actor death
|
Two new `Config` knobs: `spin_budget_cycles` (RDTSC cycles to spin; `0`
|
||||||
|
recovers today's behaviour) and `max_spinners` (cap on concurrent spinners;
|
||||||
|
default `N/2`). Single new atomic `n_spinning`. No change to the run-queue
|
||||||
|
data structure — lands on the current `Mutex<VecDeque>` and is independent of
|
||||||
|
any future queue topology work.
|
||||||
|
|
||||||
|
Full spec: `rfc_004-tunable-scheduler-idle-policy.md` (artefacts.kalsbeek.dev).
|
||||||
|
|
||||||
|
### Unbounded / configurable-bounded actor count
|
||||||
|
Fixed slab with a loud assert (`Config::max_actors(n)`, default 16 384).
|
||||||
|
Revisit with a segmented slab (array of `AtomicPtr<Segment>`, doubling segment
|
||||||
|
sizes, append-only) once the cap is actually hit. Do not let it calcify.
|
||||||
|
|
||||||
|
### gen_server: handle_info
|
||||||
|
Needs a cross-channel mailbox merge (call/cast inbox + out-of-band signals) —
|
||||||
|
the still-unmade decision between a unified per-actor mailbox and per-channel
|
||||||
|
`recv_match` composition.
|
||||||
|
|
||||||
|
### IO fd hygiene on actor death
|
||||||
Pre-existing v0.2 TODO in `io.rs`: fds registered with epoll for a dead actor
|
Pre-existing v0.2 TODO in `io.rs`: fds registered with epoll for a dead actor
|
||||||
are not cleaned up. Audit and fix.
|
are not cleaned up. Audit and fix.
|
||||||
|
|
||||||
### 7. arm-port validation & merge
|
### arm-port validation & merge
|
||||||
`arm-port` branch carries an AAPCS64 context-switch backend, never run on
|
`arm-port` branch carries an AAPCS64 context-switch backend, never run on
|
||||||
hardware. Steps: build + run full test suite on an aarch64 device; check
|
hardware. Build + run full test suite on an aarch64 device; check
|
||||||
`chained_spawn` / `yield_many` bench medians for regressions vs x86 baseline;
|
`chained_spawn` / `yield_many` bench medians; merge and update README.
|
||||||
merge and update README module table to reflect multi-arch support.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user