> -----Original Message-----
> From: Mattias Rönnblom <mattias.ronnb...@ericsson.com>
> Sent: Tuesday, July 4, 2023 10:44 PM
> To: Van Haaren, Harry <harry.van.haa...@intel.com>; Stephen Hemminger
> <step...@networkplumber.org>
> Cc: hof...@lysator.liu.se; dev@dpdk.org; Suanming Mou
> <suanmi...@nvidia.com>; tho...@monjalon.net;
> david.march...@redhat.com; mattias.ronnblom
> <mattias.ronnb...@ericsson.com>; sta...@dpdk.org
> Subject: [PATCH] service: avoid worker lcore exit deadlock
> 
> Calling rte_exit() from a worker lcore thread causes a deadlock in
> rte_service_finalize().
> 
> This patch makes rte_service_finalize() deadlock-free by avoiding the
> need to synchronize with service lcore threads, which in turn is
> achieved by moving service and per-lcore state from the heap to being
> statically allocated.

Elegant solution to avoiding the malloc/free in cleanup issue.
Thanks for investigating & implementing the solution!

> The BSS segment increases with ~156 kB (on x86_64 with default
> RTE_MAX_LCORE and RTE_SERVICE_NUM_MAX).
> 
> According to the service perf autotest, this change also results in a
> slight reduction of service framework overhead.
> 
> Fixes: 33666b448f15 ("service: fix crash on exit")
> Cc: harry.van.haa...@intel.com
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Mattias Rönnblom <mattias.ronnb...@ericsson.com>

Acked-by: Harry van Haaren <harry.van.haa...@intel.com>

Reply via email to