From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH] eal/armv8: high-resolution cycle counter Date: Fri, 19 Aug 2016 18:22:18 +0530 Message-ID: <20160819125217.GA7169@localhost.localdomain> References: <1471521090-21067-1-git-send-email-jerin.jacob@caviumnetworks.com> <20160819114611.GA5510@localhost.localdomain> <20160819142458.42dad72b@pcviktorin.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Nipun Gupta , "dev@dpdk.org" , "thomas.monjalon@6wind.com" , "jianbo.liu@linaro.org" , Hemant Agrawal To: Jan Viktorin Return-path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0084.outbound.protection.outlook.com [104.47.34.84]) by dpdk.org (Postfix) with ESMTP id 6100511D4 for ; Fri, 19 Aug 2016 14:52:39 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20160819142458.42dad72b@pcviktorin.fit.vutbr.cz> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Aug 19, 2016 at 02:24:58PM +0200, Jan Viktorin wrote: > On Fri, 19 Aug 2016 17:16:12 +0530 > Jerin Jacob wrote: > > > I've got a private kernel driver enabling and disabling (hopefully) properly > this for ARMv7. If we'd like to merge it, I'd like to have a single module > or at least single module with 2 implementations... > > I can post it if it would be helpful. I don't think we can use this in production as this may alter PMU state used by 'perf' etc.I think let it be a debug interface for armv7 and armv8 and disable it by default. > > Regards > Jan > > > > > > > > > > + * > > > > + */ > > > > +static inline uint64_t > > > > +rte_rdtsc(void) > > > > +{ > > > > + uint64_t tsc; > > > > + > > > > + asm volatile("mrs %0, pmccntr_el0" : "=r"(tsc)); > > > > + return tsc; > > > > +} > > > > +#endif > > > > > > > > static inline uint64_t > > > > rte_rdtsc_precise(void) > > > > -- > > > > 2.5.5 > > > > > > Do you also plan to support performance monitor event counters? > > > > No. This patch was inspired by armv7 PMU scheme and its part of DPDK. > > The sole reason to add this support to catch any performance regression > > through app/test application.Other than that, I think cntvct_el0 based > > existing scheme is good enough for all the use cases. > > > > > > > > Regards, > > > Nipun > > > > > > > -- > Jan Viktorin E-mail: Viktorin@RehiveTech.com > System Architect Web: www.RehiveTech.com > RehiveTech > Brno, Czech Republic