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 48B2845A68; Mon, 30 Sep 2024 17:04:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E930D4027C; Mon, 30 Sep 2024 17:04:45 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by mails.dpdk.org (Postfix) with ESMTP id 4A5904014F for ; Mon, 30 Sep 2024 17:04:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727708684; x=1759244684; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=EuLhxWQ662J3FhMRqjHrZNgV2/1Mayc8g3GIqxtk1Rw=; b=DJeDVwJeDNjov1NbGLc+LNZVnUem1LiVf82c8VLcXipRFXVDKneBtGFs M5H6cnscf7maCTaYj2HqOLGkGm6MAJMcGB1eH4W3X+EczU9v0GeszdGbz BrjRK/t9kg9d+TskGXzg7Jzdd5qLC5CiIE2SDRPNtK1BTef6vEUdE94Mp YwNmNuo4yhyEuTLHlBTWrZNYzpFMI93Ano+MMmK28wDKYibLlAee0RTOs 44gmiflNU8b/i+A7YlB4ZgiADxJZKjG7unAQuIjs0reriOkHnk2VV70gu 1ASrNxI50dEWKWNJJH2XfilfMJAfTGk/qnLC4nlAUFdu2YUQ35buF+JYa A==; X-CSE-ConnectionGUID: W9b1pI6UQtaoKvvIcYEb0g== X-CSE-MsgGUID: ZGrS+dxYQC+HCleZ5EwVjw== X-IronPort-AV: E=McAfee;i="6700,10204,11211"; a="37947216" X-IronPort-AV: E=Sophos;i="6.11,166,1725346800"; d="scan'208";a="37947216" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2024 08:04:37 -0700 X-CSE-ConnectionGUID: 2BorJMr2Qi+8w0klcJWgAw== X-CSE-MsgGUID: PXFrLOaQRymx7GKKepEtLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,165,1725346800"; d="scan'208";a="78161352" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 30 Sep 2024 08:04:37 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 30 Sep 2024 08:04:36 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 30 Sep 2024 08:04:34 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 30 Sep 2024 08:04:34 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.45) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 30 Sep 2024 08:04:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tIEaa/prKUAlFFgv+CjCWD57H04L3Yuy1gQc3T6hdnfvBlqEgQAqcesUNbK1JQaQIFQxb/yihbF0Gm+P0KOWWbYntcC1eDSvKAgiBDWvrDqG0Sa6o1/GLyAOe/mMQ1hmjJ4YzE6w2h7fC1mDXHXxY5FHPF9F47pJhgZk7ia9SoB3gMFOS8R66jlZV0czr0FAaAnIL+hUYuRtOO7wo2xXkJ5n2Gbe0YUx+3xEwJhTdPsJ//a4lSX3uOVdJr7vv2Q0r8g9/WhuFzOpcOdh1/ifw4TuWe9vzInn8xM3WX8Runi6nhFh+PGRs8q7B15sCJ6wMg1xVY1KIG+cw/9X4qpvpQ== 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=Fpkbp5zyqrHQVKMQrq5Nxw5UB047b0vfktxnX/sM3C4=; b=ti40fCvjttKAYFXV7Wrq9EfJmG4Ew0h8tBeTrP7gHL9bVffb2gsUCzn5aQGST3N/f3eAltx/2IOert6GG3EM7yrSrA/IvmKRkPuDuPlB97f88SNFXS+2QBXS/Gq29tQJe4Iv5EgW1z6Yz9QkNCluCJzVslZASBtFEhbgPCPpoMeHn957GhnDvYn31URFA95Sl3/TgxnG+vPLbcXuAM4DLd/8aFpUMXMTaN5ZLRF1xRnBfOxlMRLmgdPXfrzKxprWUfOpVF3xRxovREaKdFHdKXDkTYcIJjhnVREweyexYfCTq03bwbB7qnY5LGgh+06fbypg8oEahWnI0zwvfD41xA== 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 BN9PR11MB5228.namprd11.prod.outlook.com (2603:10b6:408:135::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.27; Mon, 30 Sep 2024 15:04:31 +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.8005.024; Mon, 30 Sep 2024 15:04:30 +0000 Date: Mon, 30 Sep 2024 16:04:23 +0100 From: Bruce Richardson To: Isaac Boukris CC: , , Tyler Retzlaff , Dmitry Kozlyuk , Subject: Re: [PATCH 2/2] timer/linux: override TSC freq if no tsc_known_freq Message-ID: References: <20240921140022.107239-1-iboukris@gmail.com> <20240921140022.107239-2-iboukris@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: DB9PR02CA0016.eurprd02.prod.outlook.com (2603:10a6:10:1d9::21) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|BN9PR11MB5228:EE_ X-MS-Office365-Filtering-Correlation-Id: 9340e14c-7151-41e7-ee81-08dce1612f9d 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|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?aw8Q6oMpfELVo052OdS0nDUgXkDg++XwgwBx2Lk9/ED/wCENBiFrHQfIINq2?= =?us-ascii?Q?SY5ZVkC0VJ694wAcngQUMbbWGHSU+3cRTnkvPdQ2pF6lpIIIttbK1PJfFW5M?= =?us-ascii?Q?x7/AMlLcUFjPnSKdweFzcNMt2fIgKM038GWVF1X6NmtRMJ40FuSEv0weGK8L?= =?us-ascii?Q?P6ixvXaOvvP4UkjxNkuBg3i+jvuvKMhEgE4sSCRufz17ooxqMJaF+MGV1/yJ?= =?us-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DxN25lQzboBjSxqKYsw/?= =?us-ascii?Q?BnhH5Dj9RLa6W/GOAz8loBq8lDcTaD7xynrayPzvC65EDlyZipYWc/1Abp6I?= =?us-ascii?Q?2/6ukaN7WFOUyw36FgQnIDWxo/1mxwlpIPBfFqhBMaWegNSaqYL5km/Np7c?= =?us-ascii?Q?=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)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?pprJnG2fFntquNKKJpDPf6SJ5oICxh5GROSBXdCntEpYglhnEXcRJAgs6hn9?= =?us-ascii?Q?36O1M1IRn7wdaJs5chS/Qxsti6U+YWXElEx7i9+ajEA2PW7ixtyMiQcA+C1O?= =?us-ascii?Q?Y7EPNfGXqUev1gvttkBafSd8dMAqcXxbttpmbLvC5ama08FVrxP0EyzJK5L0?= =?us-ascii?Q?pwm7nsIjCSOMVdN0Jluvhx+Fp5CDzz1O83j6b5sokDkYC6KYpnzr5NvdH8IE?= =?us-ascii?Q?fRW7GvvFCC4x11xjvSBk4JqLpn4tFjKZd+fclDFn0xURoXQtrCuy7yxm0Ee+?= =?us-ascii?Q?cxhd43wiNdZXp7ARW9Ys/bcLnKFckcvT4TaXBmsBw/mC8djVSGortoU0pDZI?= =?us-ascii?Q?VexAVuTZkNKYtDsvfGn+oFIFnG27Ayu6cerTlchB5I76FxGxO2wDfYdQvTpv?= =?us-ascii?Q?J9zWDuRMu14b6Ab47laeui1x0dCvaMwhuF53E5fpOYMxa0sFnW/RBPpxUBg6?= =?us-ascii?Q?azVOnZJsHS9Hhc50s7lMLLaDnnqoVjEyrwFFKXWEb1iI23z+9o9ZV0Hd9+td?= =?us-ascii?Q?YvHa7HtuwSq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xHKn6RTEqDQAGZyEaJ1n6KaaR?= =?us-ascii?Q?FYnVSXIFVS8ZQTunlqFryVD85UvgGoEOSJA+sFUwEze6nY0foSv1OK1VlKQz?= =?us-ascii?Q?UQ6qOR1wdSsXC1fHPvyGVJoJMKINOPLwEP8DhkRDuUn/2nXo+N9QAR4g/JrC?= =?us-ascii?Q?GpBUKtl5hSRdzNchZBUW7yzOmmw5Tn4LVOdn+MoS+phYBUilVvtKewh9tZe3?= =?us-ascii?Q?ag=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9340e14c-7151-41e7-ee81-08dce1612f9d X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 15:04:30.9131 (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: bfYu1GzDH0TFITRqyc/4864wByFSeLvzaYI6hyrGoIBXJcJmQii+iB7794c6p8UIx1BozzLnyBHkzB19SQVAnwJ5SVfdB9BPjEPA3G5JyLM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5228 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 Tue, Sep 24, 2024 at 08:04:00PM +0300, Isaac Boukris wrote: > Perhaps this was a bit hastily, I got an automated failure report on > "arm64-native-linuxapp-gcc": > > https://lab.dpdk.org/results/dashboard/patchsets/31106/ > That might be a false positive failure. I don't see how this patch could cause issues for a single ip reassembly test case. > Not sure which patch caused the problem, looking at the kernel code it > looks like 'tsc_known_freq' is only set for x86 arch, but it could be > the other patch and maybe lowering the rounding to 10KHz is too > aggressive, maybe better 100KHz or 1MHz. I don't see why we can't put an #ifdef in the code to always return true on non-x86 platforms. [Or if we don't want an #ifdef, we can always use 'if (strcmp(RTE_ARCH,"x86_64") && strcmp(RTE_ARCH,"i686"))' :-)] Don't really have a strong opinion on the rounding, maybe others do. [Since you give 3 options, I'm going to suggest going for the middle one - 100KHz!] > > As an alternative to 'tsc_known_freq' detection, maybe just provide an > init parameter to set the frequency manually, along with some > known-issue documentation. > > Maybe we should just allow to specify the frequency as a parameter at init I don't think that is a great solution, better to detect the frequency if we can. An interesting future enhancement would be to update DPDK to work with [1], where we read the tsc value directly from the kernel. According to that project, this is already available on Google production kernels, though not generally elsewhere. For those who care about having accurate TSC values, or faster startup times, having the extra kernel module to read the TSC value directly might be worthwhile. Regards, /Bruce [1] https://github.com/trailofbits/tsc_freq_khz