Skip to content

Scheduler and Core Isolation

Node1 edited this page Jun 18, 2026 · 4 revisions

Scheduler and Core Isolation

Purpose

This page describes XAI OS's no-migration and hot-core isolation model.

Contents

No Migration by Default

AI hot workers should not migrate unless a service explicitly changes placement.

Target invariant:

core migrations on hot AI paths = 0

Core Leases

Exclusive core leases bind AI Cell workers to declared cores. Leased cores should run only their assigned loop, and unrelated work should stay on housekeeping cores.

Current QEMU implementation:

  • CPU 0 is reserved for housekeeping and cannot be leased;
  • non-boot CPUs start as reserved-idle cores;
  • a valid lease marks the CPU as an AI hot core with an owner ID;
  • duplicate leases are rejected;
  • releasing a lease returns the CPU to reserved-idle state;
  • boot telemetry reports hot-core, IRQ-isolation, migration, and involuntary context-switch counters.

Ticks and Interrupts

Hot cores should avoid:

  • periodic scheduler ticks;
  • unrelated IRQs;
  • involuntary context switching;
  • background kernel work;
  • post-warmup page faults.

Required Counters

core_migrations
involuntary_context_switches
timer_ticks_on_hot_cores
unexpected_ipis
interrupts_on_hot_cores
post_ready_page_faults

These counters are correctness signals first and performance signals second. A non-zero value on a hot path should fail tests unless the service manifest explicitly allows it.

Platform Policies

Intel Desktop:

  • P-cores: AI inference and low-latency network workers;
  • E-cores: SSH, logging, source indexing, Git, build/test, background services;
  • SMT siblings disabled or reserved until explicitly enabled.

Intel Xeon:

  • keep latency-sensitive AI Cells inside one NUMA node;
  • keep NIC and NVMe queues NUMA-local;
  • keep AMX/vector-heavy workers isolated from unrelated work where available;
  • route server NIC interrupts away from AI inference cores;
  • avoid cross-node memory unless configured.

ARM/NVIDIA N1X-compatible:

  • highest-performance cores: AI inference;
  • middle cores: network/tokenizer workers;
  • efficiency cores: SSH, logging, Git, source indexing, build/test;
  • cluster migration forbidden for AI hot workers by default.

Related Pages

Clone this wiki locally