From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Ram Amrani <Ram.Amrani-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 3/5] qedr: remove CQ spinlock from RDMA CM completion handlers
Date: Mon, 23 Jan 2017 21:13:13 +0200 [thread overview]
Message-ID: <20170123191313.GB6005@mtr-leonro.local> (raw)
In-Reply-To: <1485185187-18689-4-git-send-email-Ram.Amrani-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2037 bytes --]
On Mon, Jan 23, 2017 at 05:26:25PM +0200, Ram Amrani wrote:
> From: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
>
> 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-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> ---
> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-01-23 19:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-23 15:26 [PATCH 0/5] qedr: QP and CQ fixes for 4.10 Ram Amrani
[not found] ` <1485185187-18689-1-git-send-email-Ram.Amrani-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
2017-01-23 15:26 ` [PATCH 1/5] qedr: return success when changing from QP state X to X Ram Amrani
2017-01-23 15:26 ` [PATCH 2/5] qedr: return maximum inline data capability on QP query Ram Amrani
2017-01-23 15:26 ` [PATCH 3/5] qedr: remove CQ spinlock from RDMA CM completion handlers Ram Amrani
[not found] ` <1485185187-18689-4-git-send-email-Ram.Amrani-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
2017-01-23 19:13 ` Leon Romanovsky [this message]
[not found] ` <20170123191313.GB6005-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-24 9:02 ` Amrani, Ram
[not found] ` <SN1PR07MB2207B69B469AC2113C757E6CF8750-mikhvbZlbf8TSoR2DauN2+FPX92sqiQdvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-24 10:16 ` Leon Romanovsky
[not found] ` <20170124101616.GC6005-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-24 11:05 ` Amrani, Ram
2017-01-23 15:26 ` [PATCH 4/5] qedr: avoid printing error messages for flushed CQEs if QP in error state Ram Amrani
2017-01-23 15:26 ` [PATCH 5/5] qedr: fail QP state transition from error to reset if SQ/RQ are not empty Ram Amrani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170123191313.GB6005@mtr-leonro.local \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=Ariel.Elior-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=Ram.Amrani-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox