2023-09-04 11:24 (UTC+0300), Artemy Kovalyov:
> diff --git a/lib/eal/common/eal_common_dynmem.c 
> b/lib/eal/common/eal_common_dynmem.c
> index bdbbe233a0..0d5da40096 100644
> --- a/lib/eal/common/eal_common_dynmem.c
> +++ b/lib/eal/common/eal_common_dynmem.c
> @@ -251,7 +251,10 @@ eal_dynmem_hugepage_init(void)
>                */
>               memset(&dummy, 0, sizeof(dummy));
>               dummy.hugepage_sz = hpi->hugepage_sz;
> -             if (rte_memseg_list_walk(hugepage_count_walk, &dummy) < 0)
> +             /*  memory_hotplug_lock is taken in rte_eal_init(), so it's
> +              *  safe to call thread-unsafe version.
> +              */

Nit: the lock is really taken in rte_eal_memory_init().
Probably "The lock is held during initialization, so..."
would more robust against code changes and differences between platforms.

Acked-by: Dmitry Kozlyuk <dmitry.kozl...@gmail.com>

Reply via email to