DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chao Zhu <chaozhu@linux.vnet.ibm.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] Fix prefetch instruction on IBM POWER8
Date: Fri, 25 Mar 2016 16:11:53 +0800	[thread overview]
Message-ID: <1458893513-22406-3-git-send-email-chaozhu@linux.vnet.ibm.com> (raw)
In-Reply-To: <1458893513-22406-1-git-send-email-chaozhu@linux.vnet.ibm.com>

Current prefetch instruction (dcbt) implementation for IBM POWER8 has wrong
Touch Hint(TH) parameter. The current setting of TH=1 indicates to load data from
current cache line and an unlimited number of sequentially following cache lines.
TTH=0 means to load data from current cache line. rte_prefetch0 function is defined
to load one cache line, which means TH=0 is suited here.

Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
---
 .../common/include/arch/ppc_64/rte_prefetch.h      |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_prefetch.h b/lib/librte_eal/common/include/arch/ppc_64/rte_prefetch.h
index bcc7185..9a1995e 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_prefetch.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_prefetch.h
@@ -41,17 +41,17 @@ extern "C" {
 
 static inline void rte_prefetch0(const volatile void *p)
 {
-	asm volatile ("dcbt 0,%[p],1" : : [p] "r" (p));
+	asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p));
 }
 
 static inline void rte_prefetch1(const volatile void *p)
 {
-	asm volatile ("dcbt 0,%[p],1" : : [p] "r" (p));
+	asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p));
 }
 
 static inline void rte_prefetch2(const volatile void *p)
 {
-	asm volatile ("dcbt 0,%[p],1" : : [p] "r" (p));
+	asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p));
 }
 
 static inline void rte_prefetch_non_temporal(const volatile void *p)
-- 
1.7.1

      parent reply	other threads:[~2016-03-25  8:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-25  8:11 [dpdk-dev] [PATCH 0/2] Fix parameters and prefetch function " Chao Zhu
2016-03-25  8:11 ` [dpdk-dev] [PATCH 1/2] Fix CPU and memory parameters " Chao Zhu
2016-03-25  8:48   ` David Marchand
2016-03-30 10:52     ` Thomas Monjalon
2016-03-31  1:44       ` Chao Zhu
2016-03-25  8:11 ` Chao Zhu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1458893513-22406-3-git-send-email-chaozhu@linux.vnet.ibm.com \
    --to=chaozhu@linux.vnet.ibm.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).