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 24AAF45AA0; Thu, 3 Oct 2024 16:08:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE9274025E; Thu, 3 Oct 2024 16:08:06 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by mails.dpdk.org (Postfix) with ESMTP id 4A40E4014F for ; Thu, 3 Oct 2024 16:08:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727964484; x=1759500484; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=RzeUNZ8sSQBX3G3zpnZA18FqLd2PheJnxZ08z9mLOA8=; b=bAmwhu6zOM9T2LenG6LSoqTNyWEsDOqeVEtzxtHhMHqxffvASOAdyvuT ZP8L41OsiosJjGv/wAuOn4YhjNbZgshlG8T+QfeL1ZwlT52DbjXRP4ApL h3hO/Ozh5/FSg7KrAFBdNRHMCnrHKXp6l1tyV5bQG2a/5JDGyRJtZFHzG D+Fjm/TKAqYxJ+KeBumkeOLbeBCiD4kjLL+XzVVEb+ER5xV758i8ImaQP TtPowM4k3zSqahdvaSXkin8iHRQ8MuqidhXofTrWoCypInZK4C/uJ83BS L97DKGjT10Yf3BZfrDt87Vu/+LloKH5+jEFQGk4pAOyzZHRdySU5uZy36 g==; X-CSE-ConnectionGUID: xEEE/Hc7TUOtUY0fSyGfSg== X-CSE-MsgGUID: sOwGIWYbTFCr9dVJHO9+sA== X-IronPort-AV: E=McAfee;i="6700,10204,11214"; a="26629919" X-IronPort-AV: E=Sophos;i="6.11,174,1725346800"; d="scan'208";a="26629919" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2024 07:06:18 -0700 X-CSE-ConnectionGUID: zfOskOUERLSovhtZU49hYQ== X-CSE-MsgGUID: iRxC4Va8SeSbcspoyUrenA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,174,1725346800"; d="scan'208";a="74202588" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa010.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 03 Oct 2024 07:06:18 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 3 Oct 2024 07:06:17 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 3 Oct 2024 07:06:17 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 3 Oct 2024 07:06:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NAInRwRUIGKSHf0UtgNPW07Wd3aAIKXx2y8+TkkQ94qauuG28yj9zdKBI3p1LxkYz9cUPWhSKEnIzSEPH4Um4H1nwwxpK4iy7UWNOvwjwBQgzKGEvm4fNIxKt916xzuyt658yR0f9J827R++TpIdWWLKHQAQYAx4gj62Zeaefh8Lr2jns2VvYca2QX+v83BEqPUIaMo5VLYXTTm9KkoTBh84okAx8obV2H2hp6eXrcPVTAMaUvUAX/vJB4C9SwwC9YV6OhnWvsmdCKbFLlpYwD9pX23BxgCOwZRN1pv+nILByDut0Rx0bnn8VTekFcw5P+vejN9L1eDRVhRhaBga5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qZMi7IzfJYPJt7sFk5G/ixLC1hVWYye5d8Xlv+4rfPc=; b=Z35atj2Yy40g2Ztk1MPbn+eFnv3Ryk7QjL75e+EJ6SHcPk7nPeGh+iGKjwhvIxCOtJM9Eqh0dmvydiReizkVonzenLvKKSI1Zj5LK5+sU3z0Sx34jbCyyOyaYCvPHBpaGeuh2lZg1rgwhk4haS5GyJ+1Fg6GZi7j2cHwJf3wk3/zwOhVYyrkevZbS7VG+yZeNCawep5qpNEDhDilkg4U/NRgT0ct5QMipQZ3ewKTrqg/gXZfTg6FtE18fTMFQvCiH/6unjdpilmn9jbILdRELOVmbdLmcGRJCFPLBxwqUU/v0EqkeVyT+ymwZQC9oaLCoMEneSle5PeRzuqyc1c4qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH7PR11MB5862.namprd11.prod.outlook.com (2603:10b6:510:134::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.16; Thu, 3 Oct 2024 14:06:12 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%4]) with mapi id 15.20.8026.014; Thu, 3 Oct 2024 14:06:12 +0000 Date: Thu, 3 Oct 2024 15:06:06 +0100 From: Bruce Richardson To: Isaac Boukris CC: , , , , Subject: Re: [PATCH v5 2/2] timer: allow platform to override cpu TSC frequency Message-ID: References: <20240921140022.107239-1-iboukris@gmail.com> <20241003122819.354499-1-iboukris@gmail.com> <20241003122819.354499-3-iboukris@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20241003122819.354499-3-iboukris@gmail.com> X-ClientProxiedBy: DUZPR01CA0250.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b5::6) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH7PR11MB5862:EE_ X-MS-Office365-Filtering-Correlation-Id: d50dbafb-1bab-49b4-f19e-08dce3b48975 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?tShB3+u40bKLJZ28+8CnrcrXQbkKkjIu/bftacgp7DtWwEyQCztOuwAGJ/PJ?= =?us-ascii?Q?yvi2zEjbt8qLRV2I31UTFMAiw15UIo5xuX6/qDyqGutBlimvDlge/gYXEhya?= =?us-ascii?Q?Og6LqbIsglHJjNpfSTYkb1D1XaNviKTr3cnW00rz0QeNADbt8Bd4vRjnPNpO?= =?us-ascii?Q?qCj5xLKDSPb7Tj3VIYeQJq+Lo6+Xk9UR9tgIPvgMGuAigKVRLpS594qncpsd?= =?us-ascii?Q?X3e0JcPfwo9/iEd3LoZ5WphX4pKGbe/JObwuPFat5C7Mrb/S5CaBiJwNh3aZ?= =?us-ascii?Q?BXpton7mZYR7eddg8k+Z5qpwVjASsZRMAR/KL/p88PcDsSI0r+L8kxfmmZ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mo5h+QEY7HE9Mkmx4UC?= =?us-ascii?Q?KfSF6dMv3CWJZ0dqBC3t+dU6lw+oBEYN2qD7D+h8ZA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?0tcFAb8Zbwyv2ZkYYCyak5WN/McMBoFpDZfnBdtroVm+7iUMFyVfRbn5IMWj?= =?us-ascii?Q?qEbgTm6gLn+we1KlbqSOCPEUK8R+p0vEhYX0pYhjoULEUEijRp+pLJBCcZqI?= =?us-ascii?Q?L+ITKez7Vaa+zdfg1f+ZqBJ8HT/qRAe8YlbVSFCBere2o59deFMpKfBn9sDS?= =?us-ascii?Q?k94gmZuRe6T2okI4u1iXoffuI5DG4lYfcNXmQ/A7lAV31xE1SaGMdwfjsEmg?= =?us-ascii?Q?op71DrkxVAEGjnh5vmND4mt+ZLFoOf7HokO3EPbrzOmMxPnCbsWAaU+yCX/8?= =?us-ascii?Q?fnxP+VtcB+/O7mEq4W6eD3uX+jUitIUukJrA2w3le+uQqTOAQ+YcvL+ANn3B?= =?us-ascii?Q?3+4nF3jqrCvz4Kt4sNilugxhIc1BWxzXYOIC7hgqHbV96GExGdE9nFkXlRlT?= =?us-ascii?Q?BO/FNHqnYDQRhovf7VQ6TgTpzVfjJzQl/26B6yBdkf7ntauMmsuflVvPBU61?= =?us-ascii?Q?iiQBUFRazvUJPTsE7kCk8xyM5W9I2KHN/wPcOZaWOViOPJ/5oTu/ghrPyUo8?= =?us-ascii?Q?qhIAl5WSxgIw9c/ZE66ugYYAlaWne6G+bxm5tF2BrqmG3hZ2Yx+orbpyLmDM?= =?us-ascii?Q?3t1D35RrADNTdN+Yv/DS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X?= =?us-ascii?Q?0ohNdtygRoP9MQjk3N56yL49YIi5+S9ZYlyy3WdgudF814v9uJOjB1GHcXps?= =?us-ascii?Q?vhI10XEbLclEhSQrsxaYJvrTqmDDweNHR3+XhPBTLWBm/FWeH4Jmid0JXjv2?= =?us-ascii?Q?7A=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d50dbafb-1bab-49b4-f19e-08dce3b48975 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2024 14:06:12.0568 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: M2XmXggFqRErm8pd0QTD3I6wedqcCY00qRHaygVnWvagETa/lk63YGYeMAmUOq3qVCOrzCgPsAnG/q4zmeN9f7tob+4sB1/WdcJ+w3hkcbA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB5862 X-OriginatorOrg: intel.com 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, Oct 03, 2024 at 03:26:04PM +0300, Isaac Boukris wrote: > The CPU provided value is often not accurate, allow overriding it > based on info from the host OS. > > On Linux X86, if the tsc_known_freq cpu flag is missing, it means > the kernel doesn't trust it and calculates its own. We should do > the same to avoid drift. > > On freebsd we have access to the kernel tsc_hz value, just use it. > > Signed-off-by: Isaac Boukris > --- Acked-by: Bruce Richardson