[v3] app/eventdev: detect deadlock for timer event producer

Message ID 1543859294-24259-1-git-send-email-erik.g.carrillo@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [v3] app/eventdev: detect deadlock for timer event producer |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Carrillo, Erik G Dec. 3, 2018, 5:48 p.m. UTC
  If timer events get dropped for some reason, the thread that launched
producer and worker cores will never exit, because the deadlock check
doesn't currently apply to the event timer adapter case. This commit
fixes this.

Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a
producer")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
v3:
 - Forgot to add Jerin's ack line.
v2:
 - Add a fixline to commit message (Jerin)

 app/test-eventdev/test_perf_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Jerin Jacob Kollanukkaran Dec. 16, 2018, 4:59 p.m. UTC | #1
On Mon, 2018-12-03 at 11:48 -0600, Erik Gabriel Carrillo wrote:
> If timer events get dropped for some reason, the thread that launched
> producer and worker cores will never exit, because the deadlock check
> doesn't currently apply to the event timer adapter case. This commit
> fixes this.
> 
> Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a
> producer")
> 
> Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>


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


> ---
> v3:
>  - Forgot to add Jerin's ack line.
> v2:
>  - Add a fixline to commit message (Jerin)
> 
>  app/test-eventdev/test_perf_common.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-eventdev/test_perf_common.c b/app/test-
> eventdev/test_perf_common.c
> index 8618775..f99a6a6 100644
> --- a/app/test-eventdev/test_perf_common.c
> +++ b/app/test-eventdev/test_perf_common.c
> @@ -327,7 +327,8 @@ perf_launch_lcores(struct evt_test *test, struct
> evt_options *opt,
>                 }
> 
>                 if (new_cycles - dead_lock_cycles > dead_lock_sample
> &&
> -                               opt->prod_type == EVT_PROD_TYPE_SYNT)
> {
> +                   (opt->prod_type == EVT_PROD_TYPE_SYNT ||
> +                    opt->prod_type ==
> EVT_PROD_TYPE_EVENT_TIMER_ADPTR)) {
>                         remaining = t->outstand_pkts -
> processed_pkts(t);
>                         if (dead_lock_remaining == remaining) {
>                                 rte_event_dev_dump(opt->dev_id,
> stdout);
> --
> 2.6.4
>
  

Patch

diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 8618775..f99a6a6 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -327,7 +327,8 @@  perf_launch_lcores(struct evt_test *test, struct evt_options *opt,
 		}
 
 		if (new_cycles - dead_lock_cycles > dead_lock_sample &&
-				opt->prod_type == EVT_PROD_TYPE_SYNT) {
+		    (opt->prod_type == EVT_PROD_TYPE_SYNT ||
+		     opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR)) {
 			remaining = t->outstand_pkts - processed_pkts(t);
 			if (dead_lock_remaining == remaining) {
 				rte_event_dev_dump(opt->dev_id, stdout);