bench_pt_cache/lib.rs
1//! Page-table-cache bench guest (one image, two endpoints).
2//!
3//! - **Endpoint 0 (caller `A`):** reads a count `n` from `φ[7]`,
4//! `derive_spawn`s a child Instance once (from its own image — the
5//! kernel's `derive_spawn` falls back to the running frame's image
6//! when the image slot is empty), then `host_call`s that resident
7//! child's **echo** endpoint `n` times, summing the echoes. Because
8//! the child is an `Owned` sub-VM that HALT folds back into the same
9//! cnode slot, every iteration re-CALLs the *same* resident `B`.
10//! - **Endpoint 1 (echo `B`):** returns its argument (`φ[7]`)
11//! unchanged. No data-region access ⇒ no CoW, no per-instance
12//! page-table delta.
13//!
14//! Goal: a steady-state CALL into the resident `B` allocates nothing
15//! beyond a small `KernelFrame` — no per-CALL page-table rebuild. The
16//! companion `tests/pt_cache_heap.rs` measures that directly.
17
18#![cfg_attr(target_os = "none", no_std)]
19
20use subsoil as _;