~/talk

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

Talkat Zephyr Developer Summit 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

A rewrite replaces the Cortex‑M PendSV heavy path with an inline, stack‑only context frame and a 17‑instruction resume sequence written in Thumb‑2 assembly, yielding about 8% speedup on real workloads and roughly 70% improvement in a tight microbenchmark. Tests, deterministic QEMU runs and hardware validate the approach, a lingering FPU-stack bug gets fixed, and the patch set lands as a pull request still needing review; interrupt‑exit swizzling remains slower and needs follow‑up but the core change compiles and runs.

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.