lkml.org 
[lkml]   [2018]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] soc: fsl: dpio: Add prefetch instruction
Date
In dpaa2_io_store_next(), if the current dequeue entry is not
the last, prefetch the next one as most likely it will be
requested shortly by the consumer driver.

This brings a ~3% improvement for dpaa2 ethernet driver
IP forwarding with small size frames.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
---
drivers/soc/fsl/dpio/dpio-service.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/soc/fsl/dpio/dpio-service.c b/drivers/soc/fsl/dpio/dpio-service.c
index 5583d28..56a35c0 100644
--- a/drivers/soc/fsl/dpio/dpio-service.c
+++ b/drivers/soc/fsl/dpio/dpio-service.c
@@ -613,6 +613,7 @@ struct dpaa2_dq *dpaa2_io_store_next(struct dpaa2_io_store *s, int *is_last)
if (!(dpaa2_dq_flags(ret) & DPAA2_DQ_STAT_VALIDFRAME))
ret = NULL;
} else {
+ prefetch(&s->vaddr[s->idx]);
*is_last = 0;
}

--
2.7.4
\
 
 \ /
  Last update: 2018-12-14 17:06    [W:0.352 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site