Re: [PATCH 3/5] qedr: remove CQ spinlock from RDMA CM completion handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 23, 2017 at 05:26:25PM +0200, Ram Amrani wrote:
> From: Ram Amrani <Ram.Amrani@xxxxxxxxxx>
>
> There is only a single event queue that triggers the completion
> events for the RDMA CM and it is being processed serially. This means
> that inherently there can no parallelism of CQ completion handler.
> Hence the lock is redundant.
>
> Signed-off-by: Ram Amrani <Ram.Amrani@xxxxxxxxxx>
> ---
>  drivers/infiniband/hw/qedr/qedr_cm.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)

Don't you need to remove this lock from struct qedr_cq too?

>
> diff --git a/drivers/infiniband/hw/qedr/qedr_cm.c b/drivers/infiniband/hw/qedr/qedr_cm.c
> index 63890eb..00361f3 100644
> --- a/drivers/infiniband/hw/qedr/qedr_cm.c
> +++ b/drivers/infiniband/hw/qedr/qedr_cm.c
> @@ -87,11 +87,8 @@ void qedr_ll2_tx_cb(void *_qdev, struct qed_roce_ll2_packet *pkt)
>  	qedr_inc_sw_gsi_cons(&qp->sq);
>  	spin_unlock_irqrestore(&qp->q_lock, flags);
>
> -	if (cq->ibcq.comp_handler) {
> -		spin_lock_irqsave(&cq->comp_handler_lock, flags);
> +	if (cq->ibcq.comp_handler)
>  		(*cq->ibcq.comp_handler) (&cq->ibcq, cq->ibcq.cq_context);
> -		spin_unlock_irqrestore(&cq->comp_handler_lock, flags);
> -	}
>  }
>
>  void qedr_ll2_rx_cb(void *_dev, struct qed_roce_ll2_packet *pkt,
> @@ -113,11 +110,8 @@ void qedr_ll2_rx_cb(void *_dev, struct qed_roce_ll2_packet *pkt,
>
>  	spin_unlock_irqrestore(&qp->q_lock, flags);
>
> -	if (cq->ibcq.comp_handler) {
> -		spin_lock_irqsave(&cq->comp_handler_lock, flags);
> +	if (cq->ibcq.comp_handler)
>  		(*cq->ibcq.comp_handler) (&cq->ibcq, cq->ibcq.cq_context);
> -		spin_unlock_irqrestore(&cq->comp_handler_lock, flags);
> -	}
>  }
>
>  static void qedr_destroy_gsi_cq(struct qedr_dev *dev,
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux