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 1523D4320C; Thu, 26 Oct 2023 18:28:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0382140A8A; Thu, 26 Oct 2023 18:28:45 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id 4681C402D4 for ; Thu, 26 Oct 2023 18:28:43 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6b1e46ca282so1082334b3a.2 for ; Thu, 26 Oct 2023 09:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1698337722; x=1698942522; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=WRqy7+82BKSBxnjZLtcE12eSUVtzJak68J66cPgn6CM=; b=jHQ8AmAm8v3vFMaKnn7Hu+xmlKeBUCCrFbBI8IOCLWOkr2Wb1bE6o3pTQMGx9WVH5W a5KIPM/nHaQOsrQf1CXdPEjhKlvxRqg7UQ1woF2M7UScYsRNxnwFcmrfCKvxBM+cK+Gp nGCbD/AeLGBiwfK86Z4h7Gyyj2ET8+zdHZ390jR0xqmo2vYcn4Lt5Wp/4frybQeZX973 /6WAEhmeJ2hzERmZ0DwGSFj7RHt9Eaqp4McxODj6sFmkBlZ/01taIoIP3ErAzvsX9KS9 YOMdtk+B0TLllzh9Ed/knga+vBQuMQFbr/rtK06EDk2lyV+UMsdn7xI57NGLeQzcbr9m txlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698337722; x=1698942522; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WRqy7+82BKSBxnjZLtcE12eSUVtzJak68J66cPgn6CM=; b=r64J4CfBIUBRFNF88y477u/l9g90l9PTLBWtimjumbE3GjQy8GobtAv1YjfiVKlzSc Ntnni5iqUbraO+tmujf6GYUQG5nktWX6tT8M91cCZW2DQE8aRSlIVnaMo+RUGHbZ5Kwz GSMFuqm9ltWyFaamNSFXIKM+tl4wtr3ZOYXL55IsZdXEbDK/kZ5ZzmUzBvl0jYBgwJZG 0TbL1DvGkacIcLkHfwgRTTHqoLCO4z33aMgLjfHR5NE2yjOmi+aWJ+tuigVClZDF8oAa Vu5pzp9Qas9fGSyYALSrAgklwYWb9JSCihvmP0d2ACWvjPx98W9Bw7R9UCU7/qZgWOSU RP5g== X-Gm-Message-State: AOJu0YyD4rhKL6Nz0GT6wv8TNHoY7/tAEeyG6WK6PZKlGifFVOLlPj8x muZPGfDalPNZLd8c4j2ItliK8hn04ItK5Y3hLJ05zA== X-Google-Smtp-Source: AGHT+IFg1WFEYnD/qnCsof6PnPs7uk3J8xMHR9RC9D+9mSfl0fcz/DHubgRMwXoxzy8cHHDGUDn7hg== X-Received: by 2002:a05:6a20:938c:b0:17b:40:ccd6 with SMTP id x12-20020a056a20938c00b0017b0040ccd6mr400285pzh.2.1698337722412; Thu, 26 Oct 2023 09:28:42 -0700 (PDT) Received: from hermes.local (204-195-126-68.wavecable.com. [204.195.126.68]) by smtp.gmail.com with ESMTPSA id q4-20020aa78424000000b006be2927ca7esm11378066pfn.85.2023.10.26.09.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 09:28:42 -0700 (PDT) Date: Thu, 26 Oct 2023 09:28:40 -0700 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: "Thomas Monjalon" , , , "David Marchand" Subject: Re: [PATCH v3 0/2] allow creating thread with real-time priority Message-ID: <20231026092840.71f0772b@hermes.local> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9EF9B@smartserver.smartshare.dk> References: <20231024125416.798897-1-thomas@monjalon.net> <98CBD80474FA8B44BF855DF32C47DC35E9EF99@smartserver.smartshare.dk> <98CBD80474FA8B44BF855DF32C47DC35E9EF9A@smartserver.smartshare.dk> <2434867.jE0xQCEvom@thomas> <98CBD80474FA8B44BF855DF32C47DC35E9EF9B@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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, 26 Oct 2023 16:08:02 +0200 Morten Br=C3=B8rup wrote: > > > In our recent tests, nanosleep() itself took around 50 us. So you nee= d to =20 > > sleep longer than that for your thread not to be runnable when the nano= sleep() > > wakes up again, because 50 us has already passed in "nanosleep overhead= ". =20 > > > 10 milliseconds provides plenty of margin, and corresponds to 10 jiff= ies on =20 > > a 1000 Hz kernel. (I don't know if it makes any difference for the kern= el > > 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! 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=3D= 1000 on modern CPU's.