Evidence (history.md session 5, findings 10-11, 20-core jobrunner run): rq-mutex collapses with thread count on queue-heavy load (yield-storm 6.9x slower than striped at 20T; attributed cause of the baseline's multi-thread regression on yield_many/chained_spawn), while rq-mpmc is best-or-close everywhere: best 1-thread, best slot-on ping-pong (1237us vs mutex 6754us at 20T), -23%/-41 cyc per yield roundtrip on real hardware (single-core switch_cost, interleaved). rq-striped remains the churn-heavy many-core option, selectable per build. Docs + compile_error hints in run_queue.rs updated to name rq-mpmc as the default. slot_state.rs untouched, no loom-relevant changes; lib (60) + scheduler/channel/supervisor/park_wake/wake_slot/preempt (41) pass under the new default.
111 lines
2.7 KiB
TOML
111 lines
2.7 KiB
TOML
[package]
|
||
name = "smarm"
|
||
version = "0.7.0"
|
||
edition = "2021"
|
||
rust-version = "1.95"
|
||
|
||
[lints.rust]
|
||
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(loom)"] }
|
||
|
||
[lints.clippy]
|
||
# Library code must never hide a panic behind unwrap/expect. Both are denied; an
|
||
# intentional panic is written explicitly as `match { Err(e) => panic!(..) }`.
|
||
# panic!/unreachable! are deliberately left un-linted as the blessed explicit
|
||
# form. Enforced on the library target only (`cargo clippy --lib`); tests and
|
||
# examples unwrap freely and are not gated.
|
||
unwrap_used = "deny"
|
||
expect_used = "deny"
|
||
|
||
[features]
|
||
default = ["rq-mpmc"]
|
||
smarm-trace = []
|
||
# RFC 007: native causal profiling. Zero cost when off (cf. smarm-trace): the
|
||
# hook in `maybe_preempt` and the resume-path fast-forward compile away; the
|
||
# two Slot ledger fields exist regardless and stay 0 (budget_cycles precedent).
|
||
smarm-causal = []
|
||
# RFC 016 Chunk 2: cycle-accurate per-actor time-budget accounting. Off by
|
||
# default — it costs two extra RDTSC reads per actor resume on the hot path
|
||
# (D6). The `ActorInfo.budget_cycles` field exists regardless; it just stays 0
|
||
# unless this is enabled.
|
||
budget-accounting = []
|
||
# RFC 016 Chunk 4: the live observer gen_server (src/observer.rs). Off by
|
||
# default (DECISION D10) — the read primitive (Chunks 1–3) is always present
|
||
# and unflagged; only the optional gen_server transport sits behind this, so a
|
||
# release build pays nothing for an observer it never starts.
|
||
observer = []
|
||
# Run-queue selection: exactly one, compile-time (see src/run_queue.rs).
|
||
# Non-default variants need --no-default-features (features are additive).
|
||
rq-mutex = []
|
||
rq-mpmc = []
|
||
rq-striped = []
|
||
|
||
[build-dependencies]
|
||
cc = "1"
|
||
|
||
[dependencies]
|
||
libc = "0.2"
|
||
|
||
[target.'cfg(loom)'.dependencies]
|
||
loom = "0.7"
|
||
|
||
[dev-dependencies]
|
||
libc = "0.2"
|
||
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "sync", "time"] }
|
||
|
||
[profile.dev]
|
||
panic = "unwind"
|
||
|
||
[profile.release]
|
||
panic = "unwind"
|
||
lto = "thin"
|
||
codegen-units = 1
|
||
|
||
[[bench]]
|
||
name = "primes"
|
||
harness = false
|
||
|
||
[[bench]]
|
||
name = "multi_scheduler"
|
||
harness = false
|
||
|
||
[[bench]]
|
||
name = "general"
|
||
harness = false
|
||
|
||
[[bench]]
|
||
name = "smarm_favored"
|
||
harness = false
|
||
|
||
[[bench]]
|
||
name = "tokio_favored"
|
||
harness = false
|
||
|
||
[[bench]]
|
||
name = "rq_micro"
|
||
harness = false
|
||
|
||
[[bench]]
|
||
name = "rq_runtime"
|
||
harness = false
|
||
|
||
[[bench]]
|
||
name = "switch_cost"
|
||
harness = false
|
||
|
||
# RFC 016 Chunk 4 — the live observer dump. Needs the optional gen_server.
|
||
[[example]]
|
||
name = "observer"
|
||
required-features = ["observer"]
|
||
|
||
[[example]]
|
||
name = "causal_pipeline"
|
||
required-features = ["smarm-causal"]
|
||
|
||
[[example]]
|
||
name = "causal_attrib_probe"
|
||
required-features = ["smarm-causal"]
|
||
|
||
[[example]]
|
||
name = "causal_probe"
|
||
required-features = ["smarm-causal"]
|