aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/i2c/algos/i2c-algo-bit.c
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@qlogic.com>2011-12-23 08:03:41 -0500
committerRoland Dreier <roland@purestorage.com>2012-01-03 20:53:31 -0800
commit489471095170ed1c6d0341739a243461638b0e06 (patch)
treed5820187d1d24dac7526bba2dd4dafb47c1bb0b3 /drivers/i2c/algos/i2c-algo-bit.c
parentIB/qib: Fix a possible data corruption when receiving packets (diff)
downloadwireguard-linux-489471095170ed1c6d0341739a243461638b0e06.tar.xz
wireguard-linux-489471095170ed1c6d0341739a243461638b0e06.zip
IB/qib: Optimize locking for get_txreq()
The current code locks the QP s_lock, followed by the pending_lock, I guess to to protect against the allocate failing. This patch only locks the pending_lock, assuming that the empty case is an exeception, in which case the pending_lock is dropped, and the original code is executed. This will save a lock of s_lock in the normal case. The observation is that the sdma descriptors will deplete at twice the rate of txreq's, so this should be rare. Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/i2c/algos/i2c-algo-bit.c')
0 files changed, 0 insertions, 0 deletions