Re: [PATCH for-rc 4/6] RDMA/bnxt_re: Synchronize destroy_qp with poll_cq

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

 



On Tue, Feb 20, 2018 at 11:56:29AM -0500, Doug Ledford wrote:

> After reviewing the output, I'm fine with this patch.  It shows that
> some authors do simple locking directly in the functions that need to
> take the lock, but by in large, when either the locking complexity goes
> up or even just the annotation complexity goes up, locking helpers are
> in fact very common.  As an example, kernel/sched/sched.h is full of
> helpers.

Generally speaking we should have pushback for insane locking, and
taking nested spinlocks might be the best solution or maybe not.

We've had several ABBA locking bugs lately directly because of too
much locking complexity.

Otherwise if two spinlocks are needed then I think having a helper to
obtain both is a better idea than open coding since it reduces the
chance to create an ABBA bug..

Jason
--
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



[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