From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 91CB7A0524; Thu, 7 Jan 2021 15:49:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 254F9140FA9; Thu, 7 Jan 2021 15:49:53 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 0C96D140FA7 for ; Thu, 7 Jan 2021 15:49:51 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 7D1C3182B; Thu, 7 Jan 2021 09:49:48 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 07 Jan 2021 09:49:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= dBs6IwekAqD3eebkgBWHX08heh9f+zwtodxW64fJBnU=; b=onkugbJT586FrByC T0QmTjUX5bToxeVzDo6Cd5hqOz64+RlucGNGaYAkkJ5b0c/tKw3H+Et9/qeLDa94 lM21PkAPSafwCBYlNWSWG3sQTq1i5FO+FBtmTGHoL8ThLyn4e6w1Bcp+XtU0afqd 0uPGJvVPXUtyjNUgpm/HRYDjHdYSguv2CxNCgebz0Kca42MeuDU3pYDQKNgZa6sm bY876xgLeBhA+4bvUb+eDAZpPAJMVwO2TldPkYEbsySfjq25Gn5KOPR7KF+MLeA6 mEWi3Ai12g0hLwFxis2hxWDf/DqRJRBvcPdQZkMmR0p8ImVJCaeaglh/CaPZseNP 3qdEdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=dBs6IwekAqD3eebkgBWHX08heh9f+zwtodxW64fJB nU=; b=GOBZnVneQpb7zEAmyZ4K1t0kwf05gH3iVTm0P8UOKjBDCmgJBegqTdJtL 2jdERpF51FZs4aAFkFLEuViJgecz+3apxT1grJsr9W5xv7qGpfXJtKBjPuX5CEgw Wp/tgwbfF0yQ4Sq/OQIK8y1swuZhNWMtA/E3mXp+lXdnoMnJqL+/k5wm1APk3UOM FnBL7KnDGj2jC5mdyMpfL1DoaNFmlFk3bVBe/XNO3dWLniU3Bujir3GykchzmEha bhXNeF5UgOUfLtBjAxC3EbXY9HXmaIVYyB84zv9gbK8owQ9dJ3gBNd8fcmefwx/e sKpkdlLB2lPV1br/MTJ1sP01v73Xw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdegvddgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A9118240064; Thu, 7 Jan 2021 09:49:46 -0500 (EST) From: Thomas Monjalon To: Wisam Jaddo Cc: arybchenko@solarflare.com, suanmingm@nvidia.com, akozyrev@nvidia.com, dev@dpdk.org, david.marchand@redhat.com Date: Thu, 07 Jan 2021 15:49:45 +0100 Message-ID: <2781733.EIu5Jnm4Rv@thomas> In-Reply-To: <20201126111543.16928-4-wisamm@nvidia.com> References: <20201126111543.16928-1-wisamm@nvidia.com> <20201126111543.16928-4-wisamm@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 3/4] app/flow-perf: change clock measurement functions 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 Sender: "dev" 26/11/2020 12:15, Wisam Jaddo: > The clock() function is not good practice to use for multiple > cores/threads, since it measures the CPU time used by the process > and not the wall clock time, while when running through multiple > cores/threads simultaneously, we can burn through CPU time much > faster. > > As a result this commit will change the way of measurement to use > rd_tsc, and the results will be divided by the processor frequency. > > Signed-off-by: Wisam Jaddo > Reviewed-by: Alexander Kozyrev > Reviewed-by: Suanming Mou > --- > - start_batch = clock(); > + start_batch = rte_rdtsc(); Please could you try the generic wrapper rte_get_timer_cycles? It should be the same (inline wrapper) when HPET is disabled. rdtsc refer to an x86 instruction so I prefer a more generic API. Can be a separate patch. While at it, I believe more apps could be converted.