mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-06 05:29:38 +08:00
A TLB flush no longer waits for a CPU in lazy TLB mode (idle or a kthread with the mm still loaded): it marks the CPU stale, and the CPU flushes when it switches back to that mm. A PTE that only gained access (update_mmu_cache_range(), the spurious-fault flush) is flushed on this CPU alone, since kwemu caches only translations that allowed the access. The teardown of a whole mm clears PTEs with a plain read and store. A secondary CPU's host makes its memory views once instead of a DataView per clock read. With a process moved to CPU 1 while CPU 0 idles, a page fault goes from 3,321 to 536 ns, fork+exit+wait from 118 to 80 us and clock_gettime from 500 to 358 ns; exit costs 4.3 ns less per mapped page. The kernel side is folded into the wasm: SMP patch. status.md lists the measured changes that were not applied (vendor/smp-deferred/).