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 02AADA00C5; Fri, 9 Dec 2022 20:49:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D15C410FB; Fri, 9 Dec 2022 20:49:27 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A2F1840A8B for ; Fri, 9 Dec 2022 20:49:25 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id DE72720B6C40; Fri, 9 Dec 2022 11:49:24 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DE72720B6C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1670615364; bh=dY0uYmQBQVHe8YjQXaQd23JesIPTWWvciKarx2+GHBY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sO+7hIFly9jojCfITHqkszBvR6tY20XnCqSvVKxvT0alx3OpTmi/vo/fjrUf4FeAh iDg0rVZm+W1jPmL0BVjMmFhtwaX+WyUyhqnja4U7iG8nMdibnCHg5LXIhdlUpmnlei ttV37i2mFvOTpMHq6gcLztEOJuKPSdnOZMXpYcHc= Date: Fri, 9 Dec 2022 11:49:24 -0800 From: Tyler Retzlaff To: Stephen Hemminger Cc: dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com, olivier.matz@6wind.com, mb@smartsharesystems.com Subject: Re: [PATCH v2 1/3] eal: add rte control thread create API Message-ID: <20221209194924.GA19263@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1670271868-11364-1-git-send-email-roretzla@linux.microsoft.com> <1670347706-23802-1-git-send-email-roretzla@linux.microsoft.com> <1670347706-23802-2-git-send-email-roretzla@linux.microsoft.com> <20221208170932.0ecde4b8@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221208170932.0ecde4b8@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 Thu, Dec 08, 2022 at 05:09:32PM -0800, Stephen Hemminger wrote: > On Tue, 6 Dec 2022 09:28:24 -0800 > Tyler Retzlaff wrote: > > > + /* Wait for the control thread to initialize successfully */ > > + while ((ctrl_thread_status = > > + __atomic_load_n(¶ms->ctrl_thread_status, > > + __ATOMIC_ACQUIRE)) == CTRL_THREAD_LAUNCHING) { > > + /* Yield the CPU. Using sched_yield call requires maintaining > > + * another implementation for Windows as sched_yield is not > > + * supported on Windows. > > + */ > > + rte_delay_us_sleep(1); > > + } > > Would it be worth introducing and using rte_thread_yield(). > Rather than waiting 1us which seems like a long time for this. i'd have to figure out if it can be provided for all platforms, if so then it seems reasonable. though i would not introduce it in this patch series since it isn't the central purpose of this change. more than happy to do it in a new series. of course if someone else wants to put up a patch to add it i'm more than happy to review that too. (i have a lot of patches in the pipe already i'd like to avoid getting too distracted). i'll put it in my backlog to take a look. thanks