From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B8D9745A9E for ; Wed, 2 Oct 2024 16:02:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E680402D3; Wed, 2 Oct 2024 16:02:57 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 218014021E; Wed, 2 Oct 2024 16:02:55 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 3F07320DB347; Wed, 2 Oct 2024 07:02:54 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3F07320DB347 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1727877774; bh=XgmGNUbtt6YN+Xq3Oz8y9ZAQOPDeR/BMy+jKydeTpMQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LrwLW/GBNbSYCwk2tP/srg1OyWcuWB5b2s6tesRdM59VF6K0VdXmJzkN25S94JRqG QyfbyJOqTrhTVqEGZcT1jZ65kkyLTVeOM0lRZ3julaaWWm0c6V4JtAfiLy8wtLTjSy sPgy0eGXN6Mo1QvAmpLPsHHyupP4z0xOoCEIRQKM= Date: Wed, 2 Oct 2024 07:02:54 -0700 From: Tyler Retzlaff To: 20230629203720.682f90c3@hermes.local Cc: Harry van Haaren , Stephen Hemminger , hofors@lysator.liu.se, dev@dpdk.org, Suanming Mou , thomas@monjalon.net, david.marchand@redhat.com, Mattias =?iso-8859-1?Q?R=F6nnblom?= , stable@dpdk.org Subject: Re: [PATCH] service: avoid worker lcore exit deadlock Message-ID: <20241002140254.GA11325@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20241001162603.793853-1-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241001162603.793853-1-mattias.ronnblom@ericsson.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Tue, Oct 01, 2024 at 06:26:03PM +0200, Mattias Rönnblom wrote: > 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. > > 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@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Mattias Rönnblom > --- Acked-by: Tyler Retzlaff