RTEMS | cpukit/score/.../cpu.h: Implement _CPU_Spin_wait() (!1256)

Gedare Bloom (@gedare) gitlab at rtems.org
Tue Jun 9 19:03:16 UTC 2026




Gedare Bloom started a new discussion on cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1256#note_152198

 > + * it temporarily frees up ALUs and execution units for the sibling hardware thread.
 > + * -# **Reduced Bus Contention:** It drastically lowers the rate of memory read 
 > + * requests, preventing the polling core from saturating the memory controller.
 > + *
 > + * **Deterministic Hedged Read Library (DHRL) Context:**
 > + * In RTEMS_SMP configurations utilizing the DHRL API via the RTEMS_DHRL compiler flag, 
 > + * deterministic timing and predictable memory latency across multiple cores are paramount. 
 > + * When a core is blocked waiting for a hedged read operation to resolve or a synchronization 
 > + * flag to toggle, a standard tight loop would monopolize the shared memory bus. 
 > + * `_CPU_Spin_wait()` is utilized within DHRL polling routines to "quiet" the 
 > + * waiting core. By silencing the memory bus traffic of the blocked core, it 
 > + * guarantees that the active cores performing the critical path operations have 
 > + * unimpeded, deterministic access to maximum memory bandwidth.
 > + *
 > + * @note This is an optional interface. It is only available on BSPs that 
 > + * support both RTEMS_SMP and the Deterministic Hedged Read Library (DHRL).

ditto, remove references to the DHRL here. The utility of this function is dependent only on SMP. That it gets used by a specific library is not necessary here, it is putting the dependency backwards

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1256#note_152198
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260609/36eb4020/attachment.htm>


More information about the bugs mailing list