[PATCH] service: avoid worker lcore exit deadlock

Van Haaren, Harry harry.van.haaren at intel.com
Thu Jul 6 13:33:25 CEST 2023


> -----Original Message-----
> From: Mattias Rönnblom <mattias.ronnblom at ericsson.com>
> Sent: Tuesday, July 4, 2023 10:44 PM
> To: Van Haaren, Harry <harry.van.haaren at intel.com>; Stephen Hemminger
> <stephen at networkplumber.org>
> Cc: hofors at lysator.liu.se; dev at dpdk.org; Suanming Mou
> <suanmingm at nvidia.com>; thomas at monjalon.net;
> david.marchand at redhat.com; mattias.ronnblom
> <mattias.ronnblom at ericsson.com>; stable at 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.haaren at intel.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom at ericsson.com>

Acked-by: Harry van Haaren <harry.van.haaren at intel.com>



More information about the stable mailing list