Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/evidence/m3_topology_scheduler_2026-09-24.md # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / evidence / m3_topology_scheduler_2026-09-24.md` 58 lines ยท 2325 bytes Raw Blame History Source # Evidence: timer-driven preemption and deterministic MADT placement in QEMU Branch: feat/m3-topology-scheduler Base: `0b0dc82` (main after PR #104) Commit under test: the branch tip including feat(scheduler): timer-driven preemption with MADT-aware placement ## Exact successful invocation ``` AIENOS_QEMU_VERBOSE=1 AIENOS_QEMU_TIMEOUT=90 bash scripts/qemu_boot_test.sh ``` Exit 0, QEMU_BOOT: PASS. ## Environment - Host: spark-b87b - QEMU 8.2.2 (Debian 1:8.2.2+ds-0ubuntu1.18), virt machine, gic-version=3, -smp 4 - Image: aienos-handoff.efi, aarch64-unknown-uefi, --features handoff ## Serial proof (raw lines) ``` kernel_el: EL1h mmu: enabled threads: ok interleave=ABABABABAB el0: ok write=granted forged=denied fault=contained exit=0 preempt: ok a=5716769 b=3798659 switches=4 placement: worker0=class0/core0 worker1=class0/core1 kernel: alive ``` ## What the results demonstrate - preempt: the timer IRQ (GIC INTID 30) preempts the EL1 boot context and round-robins two runnable workers through the 800-byte TrapFrame dispatcher; both counters advanced (a, b > 0) across 4 switches before the demo quiesced. - placement: the two workers were placed deterministically from the MADT efficiency classes. QEMU exposes 4 homogeneous cores (class 0), so place_task() yields class0/core0 then class0/core1. The heterogeneous path (class 0 and class 1 cores) is covered by the host test placement_fills_lowest_class_first_then_wraps. - context state: the preemption frame is the same full 800-byte TrapFrame (x0-x30, ELR/SPSR, FPCR/FPSR, q0-q31) guarded by trap_frame_layout_matches_800_bytes_and_16_byte_alignment, so SIMD/FP state survives switches. ## IRQ model The EL1 IRQ trampoline now saves the complete TrapFrame and calls thread::aienos_irq_dispatcher, which acknowledges the interrupt, re-arms the timer, ends the interrupt in the GIC, and returns the next frame to restore. handoff's timer_irq is a pure counter. Vector slot 8 (EL0 containment, PR #104) and slot 5 (IRQ) routing are unchanged. ## Boundary Emulator only. QEMU exposes one efficiency class, so cross-class migration is host-tested, not observed on hardware. No SMP bring-up of secondary cores is exercised; placement is the deterministic policy the scheduler will apply when secondary cores are started.