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 91E5C431FD for ; Wed, 25 Oct 2023 15:15:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89DFA427E1; Wed, 25 Oct 2023 15:15:57 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 213EF402D4; Wed, 25 Oct 2023 15:15:55 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 4A3CC320097F; Wed, 25 Oct 2023 09:15:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 25 Oct 2023 09:15:54 -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= 1698239752; x=1698326152; bh=cXSjPQIpZTrxP84a+tt3/Lrir0slJhTCOG8 Fp/UxhMo=; b=ZsFWLqI94kXgUD89+lOHmzPN53rIpxOLVJQ1hG3+Qo23+svsceh DaLMr9zoaPdotwjfgQ9vG+YuHxdnc5/qChNNroeBc3kBinDHKz1MwA5Bsmx8/Bri s7gWR3yN/eK9VKIXfwUe/+yAZnIi4Oclk0s/dHCSnECihpTQbrA8wewKrk+QJByb g5xq/sSSpwUtlupLUNu/vOLT7w4B2uejoHjjn2WHU7DGuwaMZaQQQstkVmFMiOdv nM89YS8aJNkbH+UBfJf8fivR8CAe9HKHoYjCjTococ+q7DRYT2L7Ny1XM4NJVMiz Yr838/hq5QKQw8QS2wypmu8Zrp5msNttx1A== 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= 1698239752; x=1698326152; bh=cXSjPQIpZTrxP84a+tt3/Lrir0slJhTCOG8 Fp/UxhMo=; b=sD4bSKfAgLAAO3jdQpcPk/prPsZrBCEwGl8xy+3TewTOuTraSEp vVX9vqJiY1+/Y82FdhiKVYUFtRfLNxRe2ZrtA+hNgxzmIsDT7I0GN8zM1Q2ete0/ pDhm0Lf6NPrInSbcBYu9DWjkAdsIAZNC/WeNvuReSoZQ+kh2+KAJ8goIJs0A8fOr odt3y1dQ2r8E+1xm6odFbDpdt+5VT01Q2E3rnAmNiWxBo0a+ftAcs6WdxgrFw08L HUpy4/UU3rVudsaXBXlGSPNH7iNSC2pwbZLD1pNtLBVUQGqkqtTQl+q5yYLjvmKO qW3QiMKbjC5JvVymqCXxfr8Tx7hfZ7YDvvQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrledtgdeivdcutefuodetggdotefrodftvf 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:15:50 -0400 (EDT) From: Thomas Monjalon To: Morten =?ISO-8859-1?Q?Br=F8rup?= , Stephen Hemminger , Min Zhou Cc: stable@dpdk.org, dev@dpdk.org, David Marchand , stable@dpdk.org, 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:15:49 +0200 Message-ID: <3767229.kQq0lBPeGt@thomas> In-Reply-To: <20231024090450.519ac82b@hermes.local> References: <20231024125416.798897-1-thomas@monjalon.net> <98CBD80474FA8B44BF855DF32C47DC35E9EF75@smartserver.smartshare.dk> <20231024090450.519ac82b@hermes.local> 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 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 preemptible= multi- > > > consumer pthreads whose scheduling policy are all SCHED_OTHER(cfs), S= CHED_IDLE > > > or SCHED_BATCH. User SHOULD be aware of the performance penalty befor= e using > > > it. > > >=20 > > > - 5. It MUST not be used by multi-producer/consumer pthreads, whose > > > 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``). =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 documentation > to describe the problem. Need to have the "you have been warned" action. Yes I can add more warnings. > Use of RT priority is incompatible with 100% poll mode as is typically do= ne > in DPDK applications. A real time thread has higher priority than other n= ecessary > kernel threads on the same CPU. Therefore if the RT thread never sleeps, = critical > system actions such as delayed writes, network packet processing and time= r updates > will not happen which makes the system unstable. 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 I'll try to pass the test by adding a sleep in the test thread. > Multiple DPDK users have learned this the hard way.