mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-02 09:19:22 +08:00
On SMP a CPU inside a JIT compile (kwemu's gathering and emitting, the host's new Module and Instance, V8's first-call compile) or inside its 20 ms yield to the host took no interrupt for 0.1 ms to tens of ms, and every TLB shootdown to it waited that long. kwemu (ABI 8) marks a compile with jit_busy in struct kw_cpu and does a flush another CPU asked for through flush_all when it ends, then looks the block up again; a compile waits while an interrupt is pending. Every module returns at once for cpu = 0, and the host calls it so inside kw_host_jit_compile (new flags argument), so V8's lazy compile falls in the window. The kernel (patch 0037) skips compiling and yielding CPUs as it skips lazy ones, and yields after taking pending interrupts. The JIT host no longer nudges the collector on a free. kwipi churn on 2 CPUs: shootdown p99.9 130 to 13 us, max 20 to 3.9 ms, calls over 1 ms 194 to 3; throughput and compile counts unchanged (kwemu.md, Numbers, Compile stalls).