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 F2430431FC for ; Wed, 25 Oct 2023 17:32:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA83842B71; Wed, 25 Oct 2023 17:32:36 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id BC3A640273; Wed, 25 Oct 2023 17:32:34 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D8F7B3200913; Wed, 25 Oct 2023 11:32:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 25 Oct 2023 11:32:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1698247952; x=1698334352; bh=+Dz1t4DkPCJJz1dB6G6jTPjmXTxbx01MP2E 6v4ZymVw=; b=R2iOkZQkdRJ5iKW9CdVe5lAa9M1NQAHWfQ1IHsxF33pwxy20bWm G/Rv7qh/Fn6p96Oi0yhx+DnzQk+XD8nm76gZAx1BaLeg6G9v9PqvEKVSbqtMpxS2 rvBrWoRhgp5SlCUtb+QzoudbrcBpxvMnY4OUUF1YObQtGvumcWOujmDE0fqHtRU8 t4rAZ1kUJccOR5Sjv8IPqgIj5X7KtNM0ob95HxhYYnNnmgqocasR7KB2f9wUrbUE BTqFaYI2NmQvlznGY3Ua50HbNLX0VYDhzaJRIocZxbaOUKkj3q6bgUfTT3INfHPS PnDKg3zDgqISWqxayJPRThOgCnus3HOGAHA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698247952; x=1698334352; bh=+Dz1t4DkPCJJz1dB6G6jTPjmXTxbx01MP2E 6v4ZymVw=; b=uREu5gqCVJWlf3LRcZKltzjwGjNtPtquvJpj3V6PLG/r81EBk9M qTTJ65tbQ643U3f9uAzgYzkoJHhBYSvVApkF65HDhF/L/y8h8YX6wLCo9eHVR52A H9Jlq6ek3BFJzBTNKw3Syah7dwaSKSOVmBuySRFQroJ78Fr9Yj49zu+6cm00coFi AEzLHACwd8qSYXgSmLgJcrkjL/BJ/kUZXS/q2F3ktRHqpWESlwoojtvUdz7ccVkL I69OG/wTS2TtMYk9VuL+rpXowylAj6BxWwbMSg9AxweAW0gHc0hsWTVemFznn6gt 8fl6CEoduRh3+pUeTyJXECJyERrKiqImrqg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrledtgdekhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Oct 2023 11:32:29 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger , Bruce Richardson , Tyler Retzlaff Cc: dev@dpdk.org, dev@dpdk.org, Morten =?ISO-8859-1?Q?Br=F8rup?= , Min Zhou , stable@dpdk.org, David Marchand , Anatoly Burakov , Narcisa Vasile , Dmitry Kozlyuk , Konstantin Ananyev , Andrew Rybchenko Subject: Re: [PATCH] eal/unix: allow creating thread with real-time priority Date: Wed, 25 Oct 2023 17:32:28 +0200 Message-ID: <3446453.QJadu78ljV@thomas> In-Reply-To: <1772583.VLH7GnMWUR@thomas> References: <20231024125416.798897-1-thomas@monjalon.net> <1772583.VLH7GnMWUR@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 25/10/2023 17:18, Thomas Monjalon: > 25/10/2023 17:14, Bruce Richardson: > > On Wed, Oct 25, 2023 at 08:08:52AM -0700, Stephen Hemminger wrote: > > > On Wed, 25 Oct 2023 15:44:25 +0200 > > > Thomas Monjalon wrote: > > > > > > > > > > > > > > > I'll try to pass the test by adding a sleep in the test thread. > > > > > > > > > > > > > > > > "sched_yield()" rather than sleep perhaps? Might better convey the > > > > > intention of the call. > > > > > > > > Do we have sched_yield on Windows? > > > > > > Windows has an equivalent but sched_yield() won't work here. > > > Since the DPDK thread is still higher priority than the kernel thread, > > > the scheduler will reschedule the DPDK thread. You need to sleep > > > to let kthread run. > > > > Interesting. Thanks for clarifying the situation. > > Indeed interesting. > I've just sent a v2 before reading this. > > So I should try a v3 with a sleep. > But then I need to find a better name than rte_thread_yield. > Ideas? I will go with rte_thread_yield_realtime(). Any sleep will suffice on Linux? What about a nanosleep? I suppose Sleep(0) is OK on Windows?