Skip to content

Conversation

@hodgesds
Copy link
Contributor

@hodgesds hodgesds commented Dec 1, 2025

Implement energy-aware scheduling (EAS) for big.LITTLE architectures.

Key features:

  • Thermal pressure tracking infrastructure using cpu_ctx->perf field
  • Frequency-invariant effective capacity calculation using scx_bpf_cpuperf_cur()
  • Energy-aware idle CPU selection with thermal, capacity, and cost scoring
  • Thermal-aware CPU selection for MODE_PERF and MODE_EFFICIENCY paths
  • Task placement based on utilization (little cores for <25%, big cores for >75%)

Implementation details:

  • get_effective_cpu_capacity() now scales by frequency: (base - thermal) * freq / 1024
  • select_best_idle_cpu() scores CPUs: capacity * 10 - energy_cost / 10
  • pick_idle_energy_aware() handles preferred/fallback core type selection
  • pick_idle_thermal_aware() provides lightweight thermal avoidance for mode-based scheduling

Statistics added for monitoring:

  • P2DQ_STAT_THERMAL_KICK/AVOID: Thermal pressure events
  • P2DQ_STAT_EAS_LITTLE_SELECT/BIG_SELECT/FALLBACK: EAS placement decisions

Enable with --enable-eas true flag.

@hodgesds hodgesds force-pushed the p2dq-phase2.1-energy-model branch 3 times, most recently from da8126e to 4cf7e31 Compare December 2, 2025 22:56
@hodgesds hodgesds force-pushed the p2dq-phase2.1-energy-model branch 5 times, most recently from 4e70dfc to 87997f3 Compare December 5, 2025 14:17
@hodgesds hodgesds enabled auto-merge December 5, 2025 14:18
@hodgesds hodgesds disabled auto-merge December 5, 2025 14:20
@hodgesds hodgesds force-pushed the p2dq-phase2.1-energy-model branch from 87997f3 to 5053876 Compare December 5, 2025 14:36
@hodgesds hodgesds enabled auto-merge December 5, 2025 14:36
…eness

Implement energy-aware scheduling (EAS) for big.LITTLE architectures.

Key features:
- Thermal pressure tracking infrastructure using cpu_ctx->perf field
- Frequency-invariant effective capacity calculation using scx_bpf_cpuperf_cur()
- Energy-aware idle CPU selection with thermal, capacity, and cost scoring
- Thermal-aware CPU selection for MODE_PERF and MODE_EFFICIENCY paths
- Task placement based on utilization (little cores for <25%, big cores for >75%)

Implementation details:
- get_effective_cpu_capacity() now scales by frequency: (base - thermal) * freq / 1024
- select_best_idle_cpu() scores CPUs: capacity * 10 - energy_cost / 10
- pick_idle_energy_aware() handles preferred/fallback core type selection
- pick_idle_thermal_aware() provides lightweight thermal avoidance for mode-based scheduling

Statistics added for monitoring:
- P2DQ_STAT_THERMAL_KICK/AVOID: Thermal pressure events
- P2DQ_STAT_EAS_LITTLE_SELECT/BIG_SELECT/FALLBACK: EAS placement decisions

Enable with --enable-eas true flag.

Signed-off-by: Daniel Hodges <[email protected]>
@hodgesds hodgesds force-pushed the p2dq-phase2.1-energy-model branch from 5053876 to 9360981 Compare December 5, 2025 14:53
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.

3 participants