From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jim Jia" Subject: Issues on prefetch function Date: Sun, 29 Sep 2013 14:03:44 +0800 (CST) Message-ID: <3dd718cf.53bc.1416850bf49.Coremail.mydpdk@126.com> Mime-Version: 1.0 Content-Type: text/plain; charset=GBK Content-Transfer-Encoding: 7bit To: "dev-VfR2kkLFssw@public.gmane.org" Return-path: 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" Hello, everyone I'm doing an experiment to test the performance of rte_prefetch0. I find the speed of that function is quit slow. When executing the following code, tit will take about 8,000,000 cycles (about 45 cycles each loop ). What's wrong with it? Thanks in advance. struct A { char a[64]; }; struct A foo[180000]; int main () { int i, j; long long a = rte_rdtsc (); for (j = 0; j < 180000; j++) { rte_prefetcht0 (&foo[j]); } long long b = rte_rdtsc (); printf ("%lld\n", b - a); return 0; }