linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] infiniband:qplib_fp:move spin_lock_bh to spin_lock in tasklet
@ 2019-03-19 16:36 Jeff Xie
  2019-03-19 19:22 ` Jason Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Xie @ 2019-03-19 16:36 UTC (permalink / raw)
  To: selvin.xavier, devesh.sharma
  Cc: somnath.kotur, chongguiguzi, sriharsha.basavapatna, dledford,
	jgg, nux-rdma, linux-kernel

It is unnecessary to call spin_lock_bh in a tasklet.

Signed-off-by: Jeff Xie <chongguiguzi@gmail.com>
---
 drivers/infiniband/hw/bnxt_re/qplib_fp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
index 71c34d5..e2541c9 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
@@ -273,14 +273,14 @@ static void bnxt_qplib_service_nq(unsigned long data)
 						     << 32;
 			cq = (struct bnxt_qplib_cq *)(unsigned long)q_handle;
 			bnxt_qplib_arm_cq_enable(cq);
-			spin_lock_bh(&cq->compl_lock);
+			spin_lock(&cq->compl_lock);
 			atomic_set(&cq->arm_state, 0);
 			if (!nq->cqn_handler(nq, (cq)))
 				num_cqne_processed++;
 			else
 				dev_warn(&nq->pdev->dev,
 					 "cqn - type 0x%x not handled\n", type);
-			spin_unlock_bh(&cq->compl_lock);
+			spin_unlock(&cq->compl_lock);
 			break;
 		}
 		case NQ_BASE_TYPE_SRQ_EVENT:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] infiniband:qplib_fp:move spin_lock_bh to spin_lock in tasklet
  2019-03-19 16:36 [PATCH] infiniband:qplib_fp:move spin_lock_bh to spin_lock in tasklet Jeff Xie
@ 2019-03-19 19:22 ` Jason Gunthorpe
  2019-03-20  0:49   ` 谢欢
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Gunthorpe @ 2019-03-19 19:22 UTC (permalink / raw)
  To: Jeff Xie
  Cc: selvin.xavier, devesh.sharma, somnath.kotur,
	sriharsha.basavapatna, dledford, nux-rdma, linux-kernel

On Wed, Mar 20, 2019 at 12:36:37AM +0800, Jeff Xie wrote:
> It is unnecessary to call spin_lock_bh in a tasklet.
> 
> Signed-off-by: Jeff Xie <chongguiguzi@gmail.com>
> ---
>  drivers/infiniband/hw/bnxt_re/qplib_fp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

I'm curious, how did you prove this was always in a tasklet?

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] infiniband:qplib_fp:move spin_lock_bh to spin_lock in tasklet
  2019-03-19 19:22 ` Jason Gunthorpe
@ 2019-03-20  0:49   ` 谢欢
  0 siblings, 0 replies; 3+ messages in thread
From: 谢欢 @ 2019-03-20  0:49 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: selvin.xavier, devesh.sharma, somnath.kotur,
	sriharsha.basavapatna, dledford, nux-rdma, linux-kernel

It was only called in the tasklet context.

root@jeff:~/git/linux-next# git grep -in  bnxt_qplib_service_nq
drivers/infiniband/hw/bnxt_re/qplib_fp.c:236:static void
bnxt_qplib_service_nq(unsigned long data)
drivers/infiniband/hw/bnxt_re/qplib_fp.c:390:
tasklet_init(&nq->worker, bnxt_qplib_service_nq,


  thanks.

Jason Gunthorpe <jgg@ziepe.ca> 于2019年3月20日周三 上午3:22写道:
>
> On Wed, Mar 20, 2019 at 12:36:37AM +0800, Jeff Xie wrote:
> > It is unnecessary to call spin_lock_bh in a tasklet.
> >
> > Signed-off-by: Jeff Xie <chongguiguzi@gmail.com>
> > ---
> >  drivers/infiniband/hw/bnxt_re/qplib_fp.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
>
> I'm curious, how did you prove this was always in a tasklet?
>
> Jason



-- 
jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-20  0:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 16:36 [PATCH] infiniband:qplib_fp:move spin_lock_bh to spin_lock in tasklet Jeff Xie
2019-03-19 19:22 ` Jason Gunthorpe
2019-03-20  0:49   ` 谢欢

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).