Roland,

I noticed the following in libmlx4, when destroying a qp:

file verbs.c, procedure mlx4_destroy_qp:
        mlx4_lock_cqs(ibqp);
        mlx4_clear_qp(to_mctx(ibqp->context), ibqp->qp_num);
        mlx4_unlock_cqs(ibqp);

(and mlx4_lock_cqs() takes pthread spinlocks).

Now, in function mlx4_clear_qp() (file src/qp.c) , we see the following:
        pthread_mutex_lock(&ctx->qp_table_mutex);

        if (!--ctx->qp_table[tind].refcnt)
                free(ctx->qp_table[tind].table);
        else
                ctx->qp_table[tind].table[qpn & ctx->qp_table_mask] = NULL;

        pthread_mutex_unlock(&ctx->qp_table_mutex);

We're (potentially) waiting on a pthread mutex inside a pthread spinlock.
Is there a problem here?

- Jack
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to