linux/drivers/scsi/cxlflash
Manoj N. Kumar ea76543127 cxlflash: Move to exponential back-off when cmd_room is not available
While profiling the cxlflash_queuecommand() path under a heavy load it
was found that number of retries to find cmd_room was fairly high.

There are two problems with the current back-off:
a) It starts with a udelay of 0
b) It backs-off linearly

Tried several approaches (a higher multiple 10*n, 100*n, as well as n^2,
2^n) and found that the exponential back-off(2^n) approach had the least
overall cost. Cost as being defined as overall time spent waiting.

The fix is to change the linear back-off to an exponential back-off.
This solution also takes care of the problem with the initial
delay (starts with 1 usec).

Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-03-28 20:43:34 -04:00
..
common.h cxlflash: Increase cmd_per_lun for better throughput 2016-03-08 21:17:33 -05:00
Kconfig
lunmgt.c cxlflash: Fix to avoid corrupting port selection mask 2015-10-30 17:23:55 +09:00
main.c cxlflash: Move to exponential back-off when cmd_room is not available 2016-03-28 20:43:34 -04:00
main.h cxlflash: Fix regression issue with re-ordering patch 2016-03-28 20:43:17 -04:00
Makefile cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
sislite.h cxlflash: Correct spelling, grammar, and alignment mistakes 2015-10-30 17:18:28 +09:00
superpipe.c cxlflash: Reorder user context initialization 2016-03-08 21:17:33 -05:00
superpipe.h cxlflash: Split out context initialization 2016-03-08 21:17:33 -05:00
vlun.c cxlflash: Fix to avoid virtual LUN failover failure 2016-01-06 20:50:08 -05:00
vlun.h cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00