From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/dequeue Date: Fri, 3 Nov 2017 18:17:41 +0530 Message-ID: <20171103124740.GA20326@jerin> References: <20171023100617.GA17957@jerin> <20171025132642.GA13977@jerin> <20171031111433.GA21742@jerin> <69adfb00-4582-b362-0540-d1d9d6bcf6aa@gmail.com> <20171101190420.GA21407@jerin> <8bc4095d-301e-3e99-9644-27848d97e9bc@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: "Ananyev, Konstantin" , "Zhao, Bing" , Olivier MATZ , "dev@dpdk.org" , "jia.he@hxt-semitech.com" , "jie2.liu@hxt-semitech.com" , "bing.zhao@hxt-semitech.com" , "Richardson, Bruce" , jianbo.liu@arm.com, hemant.agrawal@nxp.com To: Jia He Return-path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0049.outbound.protection.outlook.com [104.47.33.49]) by dpdk.org (Postfix) with ESMTP id BBCC21B5DE for ; Fri, 3 Nov 2017 13:48:07 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Fri, 3 Nov 2017 10:55:40 +0800 > From: Jia He > To: Jerin Jacob > Cc: "Ananyev, Konstantin" , "Zhao, Bing" > , Olivier MATZ , > "dev@dpdk.org" , "jia.he@hxt-semitech.com" > , "jie2.liu@hxt-semitech.com" > , "bing.zhao@hxt-semitech.com" > , "Richardson, Bruce" > , jianbo.liu@arm.com, hemant.agrawal@nxp.com > Subject: Re: [dpdk-dev] [PATCH] ring: guarantee ordering of cons/prod > loading when doing enqueue/dequeue > User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 > Thunderbird/52.4.0 > > Hi Jerin > > > On 11/2/2017 4:57 PM, Jia He Wrote: > > > > Hi, Jerin > > please see my performance test below > > On 11/2/2017 3:04 AM, Jerin Jacob Wrote: > > [...] > > > Should it be like instead? > > > > > > +#else > > > +        *old_head = __atomic_load_n(&r->cons.head, __ATOMIC_ACQUIRE); > > > +        const uint32_t prod_tail = __atomic_load_n(&r->prod.tail, > > > __ATOMIC_ACQUIRE); > > > It would be nice to see how much overhead it gives.ie back to back > > > __ATOMIC_ACQUIRE. > > I can NOT test ring_perf_autotest in our server because of the something > > wrong in PMU counter. > > All the return value of rte_rdtsc is 0 with and without your provided ko > > module. I am still > > investigating the reason. > > > > Hi Jerin > > As for the root cause of rte_rdtsc issue, it might be due to the pmu counter > frequency is too low > > in our arm64 server("Amberwing" from qualcom) > > [586990.057779] arch_timer_get_cntfrq()=20000000 > > Only 20MHz instead of 100M/200MHz, and CNTFRQ_EL0 is not even writable in > kernel space. May not be true, as I guess, linux 'perf' write those register in kernel space. Another option could be write from ATF/Secure boot loader if that is the case. > > Maybe the code in ring_perf_autotest needs to be changed? Increase the "iterations" to measure @ 200MHz. > > e.g. > >     printf("SC empty dequeue: %.2F\n", >             (double)(sc_end-sc_start) / iterations); >     printf("MC empty dequeue: %.2F\n", >             (double)(mc_end-mc_start) / iterations); > > Otherwise it is always 0 if the time difference divides by iterations. > > > -- > Cheers, > Jia >