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 B32BA41E96; Wed, 15 Mar 2023 02:26:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8EB7940A7A; Wed, 15 Mar 2023 02:26:49 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9180A400EF; Wed, 15 Mar 2023 02:26:47 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id DBB09205700C; Tue, 14 Mar 2023 18:26:46 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DBB09205700C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1678843606; bh=P6OjP5t9OoFtCF9WZowgZo6S6U7kEuzPv6j7bqDt7wE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R17UkpPmbxyT6Zg1rCbn3AiEBR0/3+ffaDcVC1Ods3lZToRT0wgehy+9mpbRLhRKI H/GukHsi6E52kLYkRyMPgu8EXcCy4CeHdoHmtJvmD04gpTB3+9IQzsEn9r5PdnvXT0 dIOXCmg1RocNnq6YhKRT3SB5AhmPw8uopJI9dP0U= Date: Tue, 14 Mar 2023 18:26:46 -0700 From: Tyler Retzlaff To: Stephen Hemminger Cc: dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com, stable@dpdk.org Subject: Re: [PATCH v4 2/2] eal: fix failure path race setting new thread affinity Message-ID: <20230315012646.GA32328@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1677782682-27200-1-git-send-email-roretzla@linux.microsoft.com> <1678834239-11569-1-git-send-email-roretzla@linux.microsoft.com> <1678834239-11569-3-git-send-email-roretzla@linux.microsoft.com> <20230314182042.6001d7c3@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230314182042.6001d7c3@hermes.local> 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 Tue, Mar 14, 2023 at 06:20:42PM -0700, Stephen Hemminger wrote: > On Tue, 14 Mar 2023 15:50:39 -0700 > Tyler Retzlaff wrote: > > > + /* Wait for the thread wrapper to initialize thread successfully */ > > + while ((thread_wrapper_status = > > + __atomic_load_n(&ctx->thread_wrapper_status, > > + __ATOMIC_ACQUIRE)) == THREAD_WRAPPER_LAUNCHING) > > + sched_yield(); > > Using pthread condition variable would be better, and avoid > using sched_yield() which is deprecated and not guaranteed to > work in cases where threads have different priority. seems reasonable since this code is platform dependent, i'll spin a new patch with a condvar then. thanks for the suggestion.