Skip to content

feat: burst detection, interactive vruntime, push LB, LLC steal, thermal - #16

Merged
AnikethTS merged 1 commit into
mainfrom
feat/advanced-scheduler-optimizations
Jun 1, 2026
Merged

AnikethTS merged 1 commit into
mainfrom
feat/advanced-scheduler-optimizations

Conversation

@AnikethTS

Copy link
Copy Markdown
Owner

BPF scheduler:

  • Burst detection: interactive tasks that saturate their slice (util ≥ 90%)
    accumulate burst_credit (max 3); next enqueue uses a 10ms burst slice
    (2× interactive) instead of 5ms; tracked as nr_burst in stats and TUI
    ordered using slice_util_ewma as a sleep-credit (up to 50ms); tasks that
    sleep more get a lower vtime and are dispatched sooner — no new struct
    field required
  • Push-based load balancing: on wakeup enqueue, up to 4 nearby idle CPUs
    are kicked (SCX_KICK flag=0) so they pull the new task immediately
    rather than waiting for the next dispatch cycle
  • LLC-aware three-pass work stealing: dispatch now prefers same-LLC CPUs
    first, then same-NUMA/diff-LLC, then cross-NUMA; cpu_llc map populated
    from /sys/devices/system/cpu/cpuN/cache/index3/id at startup;
    transparent no-op on single-socket machines
  • I/O wait wakeup boost: I/O-bound tasks (slice_util_ewma < 40) also get
    a one-shot interactive boost after just 5ms sleep, not only 50ms
  • RT preemption tracking: short runs (<300µs) while still runnable are
    counted as nr_rt_preempt; visible in new TUI rt-preempt row

Userspace:

  • --thermal-limit N: graduated batch CPU freq throttle when CPU temp
    exceeds N°C (same 75%→25% scale as PSI); shown in TUI MEMORY header
  • init_llc_map(): reads LLC topology from sysfs at startup, falls back to
    CPU-as-own-LLC if sysfs entries are absent
  • nr_burst and nr_rt_preempt exposed in TUI scheduling section, JSON
    output, and plain-text mode

@AnikethTS AnikethTS self-assigned this Jun 1, 2026
@AnikethTS
AnikethTS merged commit 5e1580c into main Jun 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant