From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Hall Subject: Re: cost of reading tsc register Date: Mon, 20 Apr 2015 09:21:41 -0700 Message-ID: <20150420162141.GB20826@mhcomputing.net> References: <115e8a38d223487488d22a99f53cc926@GURMBXV03.AD.ARICENT.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Ravi Kumar Iyer Return-path: Content-Disposition: inline In-Reply-To: <115e8a38d223487488d22a99f53cc926-AcH5Oudqfb/hfjeZMvbk8syo0RDPibkP@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Mon, Apr 20, 2015 at 02:37:53PM +0000, Ravi Kumar Iyer wrote: > We were doing some code optimizations , running DPDK based applications, and chanced upon the rte_rdtsc function [ to read tsc timestamp register value ] consuming cpu cycles of the order of 100clock cycles with a delta of upto 40cycles at times [ 60-140 cycles] > > We are actually building up a cpu intensive application which is also very clock cycle sensitive and this is impacting our implementation. > > To validate the same using a small/vanilla application we wrote a small code and tested on a single core. > Has anyone else faced a similar issue or are we doing something really atrocious here. What happened when you tried rte_rdtsc_precise ? Matthew.