OSDN Git Service

soc: fsl: dpio: Add prefetch instruction
authorIoana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>
Fri, 14 Dec 2018 16:04:05 +0000 (16:04 +0000)
committerLi Yang <leoyang.li@nxp.com>
Fri, 11 Jan 2019 21:06:54 +0000 (15:06 -0600)
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>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
drivers/soc/fsl/dpio/dpio-service.c

index bc80193..5389336 100644 (file)
@@ -630,6 +630,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;
        }