]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] libfc: tune fc_exch_em_alloc() to be O(2)
authorHillf Danton <dhillf@gmail.com>
Wed, 1 Dec 2010 00:18:17 +0000 (16:18 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 21 Dec 2010 18:24:19 +0000 (12:24 -0600)
commit1ff48b330acbd33a15cf5c26c27af43a1681799e
treea041e219fe6342d6268d71581d94c02073f681f6
parent12551bf2b4f69663c0b00133c4c2fa1b6f447685
[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