On Fri, 13 Feb 2026 at 23:01, Stephen Hemminger
<[email protected]> wrote:
>
> From: Congjie Zhou <[email protected]>
>
> When multiple secondary processes run in different containers that
> share the same hugetlbfs mount, the fbarray names can collide.
> This happens because containers use separate PID namespaces, so
> different processes in different containers can have the same PID.
>
> Fix by replacing the PID with a timestamp-based value. The TSC
> (timestamp counter) provides sufficient uniqueness since containers
> starting at the same CPU cycle is practically impossible - even 1ms
> of startup time difference means millions of cycles apart at GHz
> frequencies.
>
> Also, reduce the name buffer from PATH_MAX to RTE_FBARRAY_NAME_LEN
> since it is only used for the fbarray name.
>
Afaics, the filename generation comes from:
524e43c2ad9a ("mem: prepare memseg lists for multiprocess sync")
> Fixes: 046aa5c4477b ("mem: add memalloc init stage")
This change ^^ only moved the point in EAL init where the name was generated.
> Cc: [email protected]
>
> Signed-off-by: Congjie Zhou <[email protected]>
> Signed-off-by: Stephen Hemminger <[email protected]>
Updated comment:
* Base name: "memseg-1048576k-99-99" ~21 chars
* Suffix "_<pid>_<16hex>" +24
- * Total = 44 < RTE_FBARRAY_NAME_LEN 64
+ * Total = ~45 < RTE_FBARRAY_NAME_LEN 64
Applied, thanks.
--
David Marchand