> -----Original Message-----
> From: Mattias Rönnblom <[email protected]>
> Sent: Tuesday, July 4, 2023 10:44 PM
> To: Van Haaren, Harry <[email protected]>; Stephen Hemminger
> <[email protected]>
> Cc: [email protected]; [email protected]; Suanming Mou
> <[email protected]>; [email protected];
> [email protected]; mattias.ronnblom
> <[email protected]>; [email protected]
> 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: [email protected]
> Cc: [email protected]
> 
> Signed-off-by: Mattias Rönnblom <[email protected]>

Acked-by: Harry van Haaren <[email protected]>

Reply via email to