Commit 89c3816
committed
perf(port_arm_m): issue DSB in
Despite the addition of an additional instruction, this may hypotheti-
cally confer a performance benefit: In `wait_until_woken_up`, if the
pend operation didn't complete before the subsequent `enter_cpu_lock`
operation, `wait_until_woken_up` would run extra iterations before
PendSV is actually taken, thereby incurring performance penalty. The DSB
operation prevents this from happening.
The measured changes in the execution times of the benchmark suite lie
across the ranges of -3–+5 cycles (STM32F401, Cortex-M4F) and
-158–0 cycles (RP2040, Cortex-M0+).yield_cpu
1 parent a1262cb commit 89c3816
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
174 | 178 | | |
175 | 179 | | |
176 | 180 | | |
| |||
0 commit comments