~/talk

Cortex-M(etal): Hyper-optimized Zephyr-Friendly Context Switching for a Mature Architecture

Talkat Open Source Summit Europe 2025 · on Tuesday, 2025-08-26· at 15:05· G105 (Level 1)· [embedded-and-hardware]
name:Andy Ross
links:none on file
slides:none on file

Reworks the Cortex‑M context‑switch to a stack‑centric frame implemented as 17 thumb2 instructions (not yet Cortex‑M0 compatible), lands in a PR and shows a measurable win: 8% overall on target boards, with a tight microbenchmark ~70% faster on the core swap path. Uses ThreadMetric and deterministic QEMU to reproduce bugs (caught an FPU frame bit mistake), but the interrupt‑exit path costs ~18% due to swizzling; PendSV remains an available, higher‑latency alternative.

AI-written summary · about

  1. 0:00Introduction
  2. 1:06Benchmark wake-up call
  3. 3:56Cortex-M architecture
  4. 8:13Thumb mode specifics
  5. 10:17PendSV challenges
  6. 13:06Legacy Zephyr switch
  7. 15:30Ideal stack frame
  8. 22:28Optimized assembly
  9. 28:04FPU alignment
  10. 31:10Interrupt exit fixup
  11. 36:26IT instruction interrupts
  12. 40:58FPU bug debugging
  13. 44:06Project lessons
  14. 47:35Performance results
  15. 50:24Call for review
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.