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 A2129A054F; Sat, 11 Jun 2022 01:48:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92D5140222; Sat, 11 Jun 2022 01:48:18 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5244F40041 for ; Sat, 11 Jun 2022 01:48:16 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id A78FD20BE6BD; Fri, 10 Jun 2022 16:48:15 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A78FD20BE6BD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1654904895; bh=eLuzi0LYCVgEBFvi2EUVtAdAfXtPtoTPvUrhOCexHM4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eiHBWf6KTGkppvyFgVXkikz5ybPfQRmebyzUXHZF7NDmwnV39JCUrLGG7rN5IZiWL u0stC+0Z9dKEVkdyv59tWUBQkTN3CZRsZxf2bbOPx+762IwDFQzRuZ4bq0T133C2nZ bsVSiVHMhCiYHnhQYZKzMAk/GxLlF1SOLNzQ/wpU= Date: Fri, 10 Jun 2022 16:48:15 -0700 From: Tyler Retzlaff To: Stephen Hemminger Cc: dev@dpdk.org, anatoly.burakov@intel.com Subject: Re: [PATCH] doc/eal: add caveat about spinlocks from non-pinned threads Message-ID: <20220610234815.GE14494@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20220610152819.38737-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220610152819.38737-1-stephen@networkplumber.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Jun 10, 2022 at 08:28:19AM -0700, Stephen Hemminger wrote: > Need to warn users of DPDK spinlocks from non-pinned threads. > This is similar wording to Linux documentation in pthread_spin_init. > > Signed-off-by: Stephen Hemminger > --- > doc/guides/prog_guide/env_abstraction_layer.rst | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst > index 5f0748fba1c0..45d3de8d84f6 100644 > --- a/doc/guides/prog_guide/env_abstraction_layer.rst > +++ b/doc/guides/prog_guide/env_abstraction_layer.rst > @@ -797,6 +797,16 @@ Known Issues > > The debug statistics of rte_ring, rte_mempool and rte_timer are not supported in an unregistered non-EAL pthread. > > ++ locking > + > + If a pthread, that is not pinned to an lcore acquires a lock such as a nit: suggest not using term pthread but instead just say thread as not to imply a specific platform/implementation. > + DPDK based lock (rte_spinlock, rte_rwlock, rte_ticketlock, rte_mcslock) > + then there is a possibility of large application delays. > + The problem is that if a thread is scheduled off the CPU while it holds > + a lock, then other threads will waste time spinning on the lock until 'until the lock holder' -> 'until the thread holding the lock' but i'm not really fussed, just a suggestion. > + the lock holder is once more rescheduled and releases the lock. > + > + > cgroup control > ~~~~~~~~~~~~~~ > > -- > 2.35.1