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 655B04320B; Thu, 26 Oct 2023 21:55:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56750402D6; Thu, 26 Oct 2023 21:55:29 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 12F16402D4 for ; Thu, 26 Oct 2023 21:55:28 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 82C9C5C01B9; Thu, 26 Oct 2023 15:55:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 26 Oct 2023 15:55:27 -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= 1698350127; x=1698436527; bh=vxqPaxblDnBYjpgFdT3I3e6ykerFEeTu/oz 7H7i4avY=; b=Fci+Na5hAHvTVJ6rusyGW49no/JvsZhlQ72ni8KHBlfPDlh0uKe MXNyjgkYA+8+R6mNWc1QJ2IA/xRmE5Xe8gTpwm39WOAUBEF0eBgjgNJdWiVG8fpK 3VG8nTMiH1VhU2SYt/rbU2dlKs7Fi3LXVQpvDes8ySp899Gs1QYavYMADzcHMQPU a3y1XGEZNjz9HaHFJAZc5m4aMNsBZh15YEJUS+8RMSDX7e8jg2b7ua53cf4tungh f0nlexVxTw0/+80gwYsnDVS99IVZBkADZ6XIEEdF8omGYLKJvvmbGt+NPttH1VF1 OSLKgRHDJ8gCRXwrk+x7eECI3TQ1HUeQlqg== 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= 1698350127; x=1698436527; bh=vxqPaxblDnBYjpgFdT3I3e6ykerFEeTu/oz 7H7i4avY=; b=khuY2AfofFbv3csKzhH1GwXq9qAaSCKuiH31jQIv2TiLru8qbKb 20mciLiXVnQkUeG8K5X3RnHYWM28t+hG1xG2CHiZfNwLwgYuySEGdyRFgeC3OsW0 1rUXJwrGxmkwOH0jXKcH8ecvpdrHDepEe+yAGp5pQUL7eTk3zbDv00owa8q0wGEl dhTeUx2QCQ2GOUBcwKMqEJE6ztcPvRnxiErszHcX+1Mp/0zNCCSsoAF+gWuJX8cZ qSOz4HnE4fF635TP9tnx0kKYTH4B2c0QwpAx/7lDnBZ5SafBrU/sgGM31PYnDfQc qpHQ28XVlC+ERJm6LUx9TQe8RGk1bCwdf3g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrledvgddugedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtudenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeefhfejleeuvdevtddutdeutdevhfeijeethfffueejhfetuddu vedtkedtieekffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Oct 2023 15:55:26 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: Morten =?ISO-8859-1?Q?Br=F8rup?= , dev@dpdk.org, bruce.richardson@intel.com, dev@dpdk.org, David Marchand Subject: Re: [PATCH v3 0/2] allow creating thread with real-time priority Date: Thu, 26 Oct 2023 21:55:24 +0200 Message-ID: <2655403.X9hSmTKtgW@thomas> In-Reply-To: <20231026092840.71f0772b@hermes.local> References: <20231024125416.798897-1-thomas@monjalon.net> <98CBD80474FA8B44BF855DF32C47DC35E9EF9B@smartserver.smartshare.dk> <20231026092840.71f0772b@hermes.local> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" 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 26/10/2023 18:28, Stephen Hemminger: > On Thu, 26 Oct 2023 16:08:02 +0200 > Morten Br=F8rup wrote: >=20 > > > > In our recent tests, nanosleep() itself took around 50 us. So you n= eed to =20 > > > sleep longer than that for your thread not to be runnable when the na= nosleep() > > > wakes up again, because 50 us has already passed in "nanosleep overhe= ad". =20 > > > > 10 milliseconds provides plenty of margin, and corresponds to 10 ji= ffies on =20 > > > a 1000 Hz kernel. (I don't know if it makes any difference for the ke= rnel > > > scheduler if the timer crosses a jiffy border or not.) > > >=20 > > > 10 ms looks like an eternity. =20 > >=20 > > Agree. It is only for functional testing, not for production! >=20 > To be safe the sleep has to be longer than the system clock tick. > Most systems are built today with HZ=3D250 but really should be using HZ= =3D1000 > on modern CPU's. If it has to be more than 1 ms, we should mention it is a slow call which may be skipped if the thread is already blocking on something else.