RE: [PATCH for-next] RDMA/rxe: Convert spin_lock_irqsave to spin_lock

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

 



Yes. Every time it turns out that you really need irqsave locks for rxe it is because some maniac is calling into the verbs API at interrupt level. I have run into this a couple of times.

Bob

-----Original Message-----
From: Jason Gunthorpe <jgg@xxxxxxxxxx> 
Sent: Friday, October 28, 2022 12:33 PM
To: Bob Pearson <rpearsonhpe@xxxxxxxxx>
Cc: zyjzyj2000@xxxxxxxxx; linux-rdma@xxxxxxxxxxxxxxx
Subject: Re: [PATCH for-next] RDMA/rxe: Convert spin_lock_irqsave to spin_lock

On Thu, Oct 06, 2022 at 12:04:55PM -0500, Bob Pearson wrote:
> Currently the rxe driver uses a spin_lock_irqsave call to protect the 
> producer end of a completion queue from multiple QPs which may be 
> sharing the cq. Since all accesses to the cq are from tasklets this is 
> overkill and a simple spin_lock will be sufficient.

A tasklet is a softirq, which means it needs to use the BH suffix for all acquires that are in a process context if it the spinlock is obtained from a tasklet

There is a nice table in Documentation/kernel-hacking/locking.rst that explains this.

Jason




[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