From ea8403d08483af413f5441daa2d156f850fd33ce Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Wed, 23 Oct 2019 21:37:07 +0530 Subject: [PATCH] event/octeontx2: remove hot spots by prefetching data Recent profiling revealed few hotspots in octeontx2 event device driver add prefetch hints to reduce stalls. Signed-off-by: Pavan Nikhilesh --- drivers/event/octeontx2/otx2_worker.h | 1 + drivers/event/octeontx2/otx2_worker_dual.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/event/octeontx2/otx2_worker.h b/drivers/event/octeontx2/otx2_worker.h index 7a55caca5f..7d161c85ee 100644 --- a/drivers/event/octeontx2/otx2_worker.h +++ b/drivers/event/octeontx2/otx2_worker.h @@ -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); diff --git a/drivers/event/octeontx2/otx2_worker_dual.c b/drivers/event/octeontx2/otx2_worker_dual.c index ff68472ef8..7016eee4a9 100644 --- a/drivers/event/octeontx2/otx2_worker_dual.c +++ b/drivers/event/octeontx2/otx2_worker_dual.c @@ -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 *) \ -- 2.20.1