[dpdk-dev] event/octeontx: improve dequeue performance

Message ID 20170609120650.32027-1-jerin.jacob@caviumnetworks.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Jerin Jacob June 9, 2017, 12:06 p.m. UTC
  switch tag wait is a costly operation as it may
translate to IOB read if core swtag cache is not updated.
Do tag switch wait only when there is a tag request on
the same hardware work slot.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/event/octeontx/ssovf_worker.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Eads, Gage June 13, 2017, 11:06 p.m. UTC | #1
>  -----Original Message-----
>  From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
>  Sent: Friday, June 9, 2017 7:07 AM
>  To: dev@dpdk.org
>  Cc: hemant.agrawal@nxp.com; Eads, Gage <gage.eads@intel.com>; Van
>  Haaren, Harry <harry.van.haaren@intel.com>; Jerin Jacob
>  <jerin.jacob@caviumnetworks.com>
>  Subject: [dpdk-dev] [PATCH] event/octeontx: improve dequeue performance
>  
>  switch tag wait is a costly operation as it may translate to IOB read if core
>  swtag cache is not updated.
>  Do tag switch wait only when there is a tag request on the same hardware
>  work slot.
>  
>  Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Acked-by: Gage Eads <gage.eads@intel.com>
  
Jerin Jacob June 20, 2017, 2:19 p.m. UTC | #2
-----Original Message-----
> Date: Tue, 13 Jun 2017 23:06:27 +0000
> From: "Eads, Gage" <gage.eads@intel.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, "dev@dpdk.org"
>  <dev@dpdk.org>
> CC: "hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>, "Van Haaren, Harry"
>  <harry.van.haaren@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] event/octeontx: improve dequeue performance
> 
> 
> >  -----Original Message-----
> >  From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> >  Sent: Friday, June 9, 2017 7:07 AM
> >  To: dev@dpdk.org
> >  Cc: hemant.agrawal@nxp.com; Eads, Gage <gage.eads@intel.com>; Van
> >  Haaren, Harry <harry.van.haaren@intel.com>; Jerin Jacob
> >  <jerin.jacob@caviumnetworks.com>
> >  Subject: [dpdk-dev] [PATCH] event/octeontx: improve dequeue performance
> >  
> >  switch tag wait is a costly operation as it may translate to IOB read if core
> >  swtag cache is not updated.
> >  Do tag switch wait only when there is a tag request on the same hardware
> >  work slot.
> >  
> >  Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> 
> Acked-by: Gage Eads <gage.eads@intel.com>

Applied to dpdk-next-eventdev/master. Thanks.
  

Patch

diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c
index ad3fe684d..1b372148f 100644
--- a/drivers/event/octeontx/ssovf_worker.c
+++ b/drivers/event/octeontx/ssovf_worker.c
@@ -126,9 +126,9 @@  ssows_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks)
 
 	RTE_SET_USED(timeout_ticks);
 
-	ssows_swtag_wait(ws);
 	if (ws->swtag_req) {
 		ws->swtag_req = 0;
+		ssows_swtag_wait(ws);
 		return 1;
 	} else {
 		return ssows_get_work(ws, ev);
@@ -142,9 +142,9 @@  ssows_deq_timeout(void *port, struct rte_event *ev, uint64_t timeout_ticks)
 	uint64_t iter;
 	uint16_t ret = 1;
 
-	ssows_swtag_wait(ws);
 	if (ws->swtag_req) {
 		ws->swtag_req = 0;
+		ssows_swtag_wait(ws);
 	} else {
 		ret = ssows_get_work(ws, ev);
 		for (iter = 1; iter < timeout_ticks && (ret == 0); iter++)