event/octeontx2: remove hot spots by prefetching data
authorPavan Nikhilesh <pbhagavatula@marvell.com>
Wed, 23 Oct 2019 16:07:07 +0000 (21:37 +0530)
committerJerin Jacob <jerinj@marvell.com>
Thu, 31 Oct 2019 10:48:44 +0000 (11:48 +0100)
Recent profiling revealed few hotspots in octeontx2 event device
driver add prefetch hints to reduce stalls.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
drivers/event/octeontx2/otx2_worker.h
drivers/event/octeontx2/otx2_worker_dual.c

index 7a55cac..7d161c8 100644 (file)
@@ -280,6 +280,7 @@ otx2_ssogws_event_tx(struct otx2_ssogws *ws, struct rte_event ev[],
        struct rte_mbuf *m = ev[0].mbuf;
        const struct otx2_eth_txq *txq = otx2_ssogws_xtract_meta(m);
 
+       rte_prefetch_non_temporal(txq);
        /* Perform header writes before barrier for TSO */
        otx2_nix_xmit_prepare_tso(m, flags);
        otx2_ssogws_order(ws, !ev->sched_type);
index ff68472..7016eee 100644 (file)
@@ -148,6 +148,7 @@ otx2_ssogws_dual_deq_ ##name(void *port, struct rte_event *ev,              \
        struct otx2_ssogws_dual *ws = port;                             \
        uint8_t gw;                                                     \
                                                                        \
+       rte_prefetch_non_temporal(ws);                                  \
        RTE_SET_USED(timeout_ticks);                                    \
        if (ws->swtag_req) {                                            \
                otx2_ssogws_swtag_wait((struct otx2_ssogws *)           \