[PATCH v2] eal: fix memory initialization deadlock

2023-09-04 Thread Artemy Kovalyov
g_list_walk() with rte_memseg_list_walk_thread_unsafe(). Bugzilla ID: 1277 Fixes: 832cecc03d77 ("rwlock: prevent readers from starving writers") Cc: sta...@dpdk.org Signed-off-by: Artemy Kovalyov --- v2: changed walk to thread-unsafe version in eal_dynmem_hugepage_init() 32-bit flo

RE: [PATCH v2] eal: fix memory initialization deadlock

2023-09-05 Thread Artemy Kovalyov
> > + /* 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

[PATCH v3] eal: fix memory initialization deadlock

2023-09-06 Thread Artemy Kovalyov
dk.org Signed-off-by: Artemy Kovalyov --- v2: changed walk to thread-unsafe version in eal_dynmem_hugepage_init() 32-bit flow v3: added lock annotation for the flow --- lib/eal/common/eal_common_dynmem.c | 5 - lib/eal/common/eal_memalloc.h | 3 ++- lib/eal/common/eal_private.h

[PATCH v4 0/2] fix memory initialization deadlock

2023-09-08 Thread Artemy Kovalyov
with rte_memseg_list_walk_thread_unsafe(). Implementing a lock annotation for rte_memseg_list_walk() to proactively identify bugs similar to this one during compile time. Artemy Kovalyov (2): eal: fix memory initialization deadlock eal: annotate rte_memseg_list_walk() lib/eal/common/eal_common_dynmem.c

[PATCH v4 1/2] eal: fix memory initialization deadlock

2023-09-08 Thread Artemy Kovalyov
Fixes: 832cecc03d77 ("rwlock: prevent readers from starving writers") Cc: sta...@dpdk.org Signed-off-by: Artemy Kovalyov --- lib/eal/common/eal_common_dynmem.c | 5 - lib/eal/include/generic/rte_rwlock.h | 4 lib/eal/linux/eal_memalloc.c | 7 +-- 3 files changed,

[PATCH v4 2/2] eal: annotate rte_memseg_list_walk()

2023-09-08 Thread Artemy Kovalyov
Implementing a lock annotation for rte_memseg_list_walk() to proactively identify bugs similar to memory_hotplug_lock deadlock during initialization during compile time. Bugzilla ID: 1277 Signed-off-by: Artemy Kovalyov --- lib/eal/common/eal_memalloc.h | 3 ++- lib/eal/common

[PATCH 1/5] app/test-pm: add multiprocess test

2023-12-11 Thread Artemy Kovalyov
This commit adds a test scenario that initiates multiple processes concurrently. These processes attach to the same shared heap, with an automatic detection mechanism to identify the primary process. Signed-off-by: Artemy Kovalyov --- app/meson.build | 1 + app/test-mp/main.c | 49

[PATCH 3/5] ipc: fix mp channel closure to prevent message loss

2023-12-11 Thread Artemy Kovalyov
process was closing it's mp channel. In this fix, we delete mp socket file before stopping mp receive thread. Fixes: e7885281ded1 ("ipc: stop mp control thread on cleanup") Cc: sta...@dpdk.org Signed-off-by: Artemy Kovalyov --- lib/eal/common/eal_common_proc.c | 4 ++-- 1 file change

[PATCH 4/5] eal: fix first time primary autodetect

2023-12-11 Thread Artemy Kovalyov
If the configuration file is absent, the autodetection function should generate and secure it. Otherwise, multiple simultaneous openings could erroneously identify themselves as primary instances. Fixes: af75078fece3 ("first public release") Cc: sta...@dpdk.org Signed-off-by: Artem

[PATCH 5/5] eal: fix memzone fbarray cleanup

2023-12-11 Thread Artemy Kovalyov
propose explicitly closing the memzone fbarray. This ensures proper order of operations during process closure and prevents any potential race conditions arising from the mismatched lock release timings. Fixes: af75078fece3 ("first public release") Cc: sta...@dpdk.org Signed-off-by: Artem

[PATCH 0/5] addressing races in concurrent process startup

2023-12-11 Thread Artemy Kovalyov
the test. These fixes aim to ensure the robust and secure utilization of DPDK within intricate solutions that involve starting processes with job orchestrators such as Slurm or Hadoop YARN. Artemy Kovalyov (5): app/test-pm: add multiprocess test eal: fix multiprocess hotplug race ipc: fix mp

[PATCH 2/5] eal: fix multiprocess hotplug race

2023-12-11 Thread Artemy Kovalyov
() operation to fail in another secondary process. To avoid this, disregarding ENOTSUP responses to attach notifications. Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Cc: sta...@dpdk.org Signed-off-by: Artemy Kovalyov --- lib/eal/common/hotplug_mp.c | 3 +++ 1 file changed, 3

[PATCH v2 1/5] app/test-mp: add multiprocess test

2023-12-16 Thread Artemy Kovalyov
This commit adds a test scenario that initiates multiple processes concurrently. These processes attach to the same shared heap, with an automatic detection mechanism to identify the primary process. Signed-off-by: Artemy Kovalyov --- v2: CI && CR fixes - add missing includ

[PATCH] eal: fix memory initialization deadlock

2023-08-30 Thread Artemy Kovalyov
g_list_walk() with rte_memseg_list_walk_thread_unsafe(). Bugzilla ID: 1277 Fixes: 832cecc03d77 ("rwlock: prevent readers from starving writers") Cc: sta...@dpdk.org Signed-off-by: Artemy Kovalyov --- lib/eal/include/generic/rte_rwlock.h | 4 lib/eal/linux/eal_memalloc.c

[PATCH 0/5] addressing races in concurrent process startup

2024-03-06 Thread Artemy Kovalyov
the test. These fixes aim to ensure the robust and secure utilization of DPDK within intricate solutions that involve starting processes with job orchestrators such as Slurm or Hadoop YARN. Artemy Kovalyov (5): app/test-mp: add multiprocess test eal: fix multiprocess hotplug race ipc: fix mp

[PATCH 0/5] addressing races in concurrent process startup

2024-03-06 Thread Artemy Kovalyov
the test. These fixes aim to ensure the robust and secure utilization of DPDK within intricate solutions that involve starting processes with job orchestrators such as Slurm or Hadoop YARN. Artemy Kovalyov (5): app/test-mp: add multiprocess test eal: fix multiprocess hotplug race ipc: fix mp

[PATCH v2 1/5] app/test-mp: add multiprocess test

2024-03-06 Thread Artemy Kovalyov
This commit adds a test scenario that initiates multiple processes concurrently. These processes attach to the same shared heap, with an automatic detection mechanism to identify the primary process. Signed-off-by: Artemy Kovalyov --- app/meson.build | 1 + app/test-mp/main.c | 52

[PATCH v2 2/5] eal: fix multiprocess hotplug race

2024-03-06 Thread Artemy Kovalyov
() operation to fail in another secondary process. To avoid this, disregarding ENOTSUP responses to attach notifications. Fixes: 244d5130719c ("eal: enable hotplug on multi-process") Cc: sta...@dpdk.org Signed-off-by: Artemy Kovalyov --- lib/eal/common/hotplug_mp.c | 3 +++ 1 file changed, 3

[PATCH v2 3/5] ipc: fix mp channel closure to prevent message loss

2024-03-06 Thread Artemy Kovalyov
process was closing it's mp channel. In this fix, we delete mp socket file before stopping mp receive thread. Fixes: e7885281ded1 ("ipc: stop mp control thread on cleanup") Cc: sta...@dpdk.org Signed-off-by: Artemy Kovalyov --- lib/eal/common/eal_common_proc.c | 4 ++-- 1 file change

[PATCH v2 5/5] eal: fix memzone fbarray cleanup

2024-03-06 Thread Artemy Kovalyov
propose explicitly closing the memzone fbarray. This ensures proper order of operations during process closure and prevents any potential race conditions arising from the mismatched lock release timings. Fixes: af75078fece3 ("first public release") Cc: sta...@dpdk.org Signed-off-by: Artem

[PATCH v2 4/5] eal: fix first time primary autodetect

2024-03-06 Thread Artemy Kovalyov
If the configuration file is absent, the autodetection function should generate and secure it. Otherwise, multiple simultaneous openings could erroneously identify themselves as primary instances. Fixes: af75078fece3 ("first public release") Cc: sta...@dpdk.org Signed-off-by: Artem