From: Neil Horman Date: Fri, 6 Jul 2012 17:40:05 +0000 (-0700) Subject: [SCSI] fcoe: Cleanup locking on fcoe_percpu_receive_thread X-Git-Tag: v3.6-rc1~103^2~26 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95fdd5e980e6eea4579c15043f7a9be6ad63012c;p=pandora-kernel.git [SCSI] fcoe: Cleanup locking on fcoe_percpu_receive_thread Noticed that we can shuffle the code around in fcoe_percpu_receive_thread a bit and avoid taking the fcoe_rx_list lock twice per iteration. This should improve throughput somewhat. With this change we take the lock, and check for new frames in a single critical section. Only if the list is empty do we drop the lock and re-acquire it after being signaled to wake up. Change Notes: v2) did some further cleanup on the patch by replacing the 2nd call of spin_lock/splice_init with a goto to the top of the outer loop. This allows me to change the inner while loop to an if conditional and remove the sencond check of kthread_should_stop. Based on suggestion from Vasu Dev. Signed-off-by: Neil Horman Acked-by: Vasu Dev Signed-off-by: Robert Love Signed-off-by: James Bottomley --- Reading git-diff-tree failed