]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sdp: device_removal_lock should not be a spinlock because module removal takes a...
authorEldad Zinger <eldadz@mellanox.co.il>
Sun, 4 Jul 2010 13:30:43 +0000 (16:30 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:08 +0000 (05:05 -0700)
commitd88b3468e769df80bea2425d10687a37cd36a6f9
tree8ee5800a1f9efaf70d7b390226c294c8fc4ca5d4
parent123e27ca2fc2c55a6af2e76d5e2e53e1555bb606
sdp: device_removal_lock should not be a spinlock because module removal takes a long time.

In order to prevent a situation that many CPUs are stack with read-spinlock
waiting for remove-device write-lock to be freed, I replaced the rw-spinlock
with rw-semaphore. That way the blocked processes goes to sleep and are not
blocking other processes.

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp.h
drivers/infiniband/ulp/sdp/sdp_cma.c
drivers/infiniband/ulp/sdp/sdp_main.c