RTEMS | cpukit: Create DHRL Library for DRAM Latency Mitigation (!1193)
Gedare Bloom (@gedare)
gitlab at rtems.org
Wed May 20 20:47:43 UTC 2026
Gedare Bloom started a new discussion on cpukit/dhrl/dhrl.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1193#note_150600
> +/* Determine optimal interleave bit for given memory region */
> +static void dhrl_calibrate_interleave( struct dhrl_control *ctx )
> +{
> + if ( ctx->active_config.interleave_bit != 0 ) {
> + return;
> + }
> +
> + uint8_t best_bit = 6;
> + uint64_t lowest_latency = UINT64_MAX;
> +
> + uint8_t max_safe_bit = 0;
> + size_t safe_size = ctx->active_config.memory_region_size / 2;
> + while ( safe_size > 1 ) {
> + max_safe_bit++;
> + safe_size >>= 1;
> + }
This looks like find first set bit. Can you reuse existing code like `_Bitfield_Find_first_bit`?
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1193#note_150600
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/20260520/240391d9/attachment-0001.htm>
More information about the bugs
mailing list