From: Chao Zhu <chaozhu@linux.vnet.ibm.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 2/2] Fix prefetch instruction on IBM POWER8
Date: Wed, 30 Mar 2016 23:39:17 +0800 [thread overview]
Message-ID: <1459352357-852-3-git-send-email-chaozhu@linux.vnet.ibm.com> (raw)
In-Reply-To: <1459352357-852-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
next prev parent reply other threads:[~2016-03-30 15:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 15:39 [dpdk-dev] [PATCH v2 0/2] Fix parameters and prefetch function " Chao Zhu
2016-03-30 15:39 ` [dpdk-dev] [PATCH v2 1/2] Fix CPU and memory parameters " Chao Zhu
2016-03-30 15:39 ` Chao Zhu [this message]
2016-04-01 10:45 ` [dpdk-dev] [PATCH v2 0/2] Fix parameters and prefetch function " Thomas Monjalon
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=1459352357-852-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).