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 9F2DC431FC for ; Wed, 25 Oct 2023 15:44:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9258142D7B; Wed, 25 Oct 2023 15:44:35 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id E962840273; Wed, 25 Oct 2023 15:44:32 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id DE0F932009AF; Wed, 25 Oct 2023 09:44:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 25 Oct 2023 09:44:32 -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= 1698241470; x=1698327870; bh=uH+1Gdand/yZU8meCHlfnmOnhPu1//nTGBN vEM27Bms=; b=MM3Sz81JTpyty75xP/446LBKnVAXWGkY09U4Tzq+jI9+Ub1qfSy nvWA60KOoeh3X4CF91DrfhmV1Lpcy5mhP5AW5ZTs9Q5Ay42vNnpuTaNeT7yH0LGH iDiIjfRFuq5XCxVHaKAXUr10fvhDOe8WrCLCn0HUrxVTV6lNN5CmwzEAIcGngMN5 Pc8gZdqxxppgqeGWTP8LR2E8zDkMW2VlVssBQcMn25xYg/+VRPRlhTluYjWr4W7C 1HiOt1Jbqi+NfcpYV5G87iWF22gPCGzC7VHh2lvA5UCMyxRGOBS9aebQJIWmidkB BltLli5bebYLt4je2vjjo4yEsZs1SfSE9lQ== 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= 1698241470; x=1698327870; bh=uH+1Gdand/yZU8meCHlfnmOnhPu1//nTGBN vEM27Bms=; b=tscYFCwPTsZqNfGOPEICz+LAU2MR1aZbfjW8cyrd2PtbcmhyjFo yXvd6fMQ7EpE3ksQkvKswsmsAbh0J8oNWy3hp/NFtlXZCQOpGAFld8O09sHeucTf RAnbKLvrpV60VrwH0ur55cU2O3gkgOkjtEos3Yi31ekuYGAS2e2YfmB+eV9nChH5 Svs/3ijZsyA3tAiGqtFsSNqjbxD/uU+bEfagMhKTCs75Xf9yNIMyVHBKBSn4hhFX T3K8ZxZ4xnjB2xAjZ4gV9M6vrNjGmWIpN8/ccZymZMGGM2F8xvlV3aIluxLwcs54 sqFZSnIj0T3x//5paSOLGsCqv+OxeUCtdOw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrledtgdeikecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttddunecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepgeejiedvleehudfhuefgfeevgfehieetgeeigffggfffffeiuefg ueektdeffeevnecuffhomhgrihhnpeguphgukhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhn rdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Oct 2023 09:44:27 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson , Tyler Retzlaff Cc: dev@dpdk.org, Morten =?ISO-8859-1?Q?Br=F8rup?= , Stephen Hemminger , Min Zhou , stable@dpdk.org, dev@dpdk.org, David Marchand , Anatoly Burakov , Narcisa Vasile , Tyler Retzlaff , Dmitry Kozlyuk , Konstantin Ananyev , Andrew Rybchenko Subject: Re: [PATCH] eal/unix: allow creating thread with real-time priority Date: Wed, 25 Oct 2023 15:44:25 +0200 Message-ID: <3187925.5fSG56mABF@thomas> In-Reply-To: References: <20231024125416.798897-1-thomas@monjalon.net> <3767229.kQq0lBPeGt@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" 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 15:34, Bruce Richardson: > On Wed, Oct 25, 2023 at 03:15:49PM +0200, Thomas Monjalon wrote: > > 24/10/2023 18:04, Stephen Hemminger: > > > On Tue, 24 Oct 2023 15:55:13 +0200 > > > Morten Br=F8rup wrote: > > >=20 > > > > >=20 > > > > > 4. It MAY be used by preemptible multi-producer and/or preempt= ible multi- > > > > > consumer pthreads whose scheduling policy are all SCHED_OTHER(cfs= ), SCHED_IDLE > > > > > or SCHED_BATCH. User SHOULD be aware of the performance penalty b= efore using > > > > > it. > > > > >=20 > > > > > - 5. It MUST not be used by multi-producer/consumer pthreads, wh= ose > > > > > scheduling policies are SCHED_FIFO or SCHED_RR. > > > > > + 5. It MUST not be used by multi-producer/consumer pthreads > > > > > + whose scheduling policies are ``SCHED_FIFO`` > > > > > + or ``SCHED_RR`` (``RTE_THREAD_PRIORITY_REALTIME_CRITICAL``)= =2E =20 > > > >=20 > > > > Do the RTS or HTS ring modes make any difference here? > > > >=20 > > > > Anyway, I agree that real-time priority should not be forbidden on = Unix. > > > >=20 > > > > Acked-by: Morten Br=F8rup > > >=20 > > > Please add a big warning message in the rte_thread.c and the document= ation > > > to describe the problem. Need to have the "you have been warned" acti= on. > >=20 > > Yes I can add more warnings. > >=20 > > > Use of RT priority is incompatible with 100% poll mode as is typicall= y done > > > in DPDK applications. A real time thread has higher priority than oth= er necessary > > > kernel threads on the same CPU. Therefore if the RT thread never slee= ps, critical > > > system actions such as delayed writes, network packet processing and = timer updates > > > will not happen which makes the system unstable. > >=20 > > Yes, and it is shown by the test on loongarch: > > DPDK:fast-tests / threads_autotest TIMEOUT 80.01s > > http://mails.dpdk.org/archives/test-report/2023-October/488760.html > >=20 > > I'll try to pass the test by adding a sleep in the test thread. > >=20 >=20 > "sched_yield()" rather than sleep perhaps? Might better convey the > intention of the call. Do we have sched_yield on Windows?