From patchwork Wed Oct 23 16:07:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 61778 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 29EB81C1A9; Wed, 23 Oct 2019 18:07:14 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id B265C1C1A5 for ; Wed, 23 Oct 2019 18:07:12 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9NG5DYe031244 for ; Wed, 23 Oct 2019 09:07:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=VUudj8VhiNspU9JlmE8RmwL/NhQa2zD149DFQrovm+o=; b=w1fCGTl0RsBKy+pDNvELHh41Fx7/tcAf6VO6wOt1YzOFtbGNm9aXIhrS5lsUUQVlCWXM Gbuz9g1hi4afC3810w/kZt5319OWwK8iFlJq1DGAk6G5fGCY15RXW+XMDUnPZhGHbHdS efB8iZeHDodHP4bTY1dZ5suNM0y6yvm0/8jbrJxOmxVq7nHndhNCXPsR9z8qH9HmoMwJ kXjJuJe/wFLtW35txlXDVWHKpnZEVr23g0rTloPM6SpHXFlLQM/YURBknzf2AX3eJGR2 Q25AQeGz0ZgHRU3VhD8bNpCSfViHcpJ0kPYFXC5jViYxwi0gP5pl1/yWTcKRyvjuz31x Gg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2vt9u5kja9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 23 Oct 2019 09:07:11 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 23 Oct 2019 09:07:10 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 23 Oct 2019 09:07:10 -0700 Received: from BG-LT7430.marvell.com (unknown [10.28.17.75]) by maili.marvell.com (Postfix) with ESMTP id 5BC543F7043; Wed, 23 Oct 2019 09:07:09 -0700 (PDT) From: To: , Pavan Nikhilesh CC: Date: Wed, 23 Oct 2019 21:37:07 +0530 Message-ID: <20191023160707.2329-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-23_04:2019-10-23,2019-10-23 signatures=0 Subject: [dpdk-dev] [PATCH] event/octeontx2: remove hotspots by prefetching data X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh 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 6f7842199..092ba71f7 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 ff68472ef..7016eee4a 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 *) \