[SCSI] libfc: tune fc_exch_em_alloc() to be O(2)
commit2034c19ce8f8503aa14cb1e763fbfe60316aaa8e
authorHillf Danton <dhillf@gmail.com>
Wed, 1 Dec 2010 00:18:17 +0000 (30 16:18 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 21 Dec 2010 18:24:19 +0000 (21 12:24 -0600)
treea041e219fe6342d6268d71581d94c02073f681f6
parent8236554a27af870ecd1cd588d9558ccdc212037b
[SCSI] libfc: tune fc_exch_em_alloc() to be O(2)

For allocating new exch from pool,  scanning for free slot in exch
array fluctuates when exch pool is close to exhaustion.

The fluctuation is smoothed, and the scan looks to be O(2).

Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/libfc/fc_exch.c