From: Mike Marciniszyn Date: Fri, 23 Dec 2011 13:03:41 +0000 (-0500) Subject: IB/qib: Optimize locking for get_txreq() X-Git-Tag: v3.3-rc1~160^2^5~1 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=489471095170ed1c6d0341739a243461638b0e06;p=pandora-kernel.git 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 Signed-off-by: Roland Dreier --- Reading git-diff-tree failed