hpsa: optimize cmd_alloc function by remembering last allocation
authorRobert Elliott <elliott@hp.com>
Fri, 23 Jan 2015 22:43:41 +0000 (16:43 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 2 Feb 2015 17:57:41 +0000 (09:57 -0800)
commit33811026a0a4208dd5725183d37fc92d5e88b0a2
tree3ee9c60da0de30a40ea02be9db13b5c75fcb0ea4
parent281a7fd03ea37c979bbba4d8376595c0288e3252
hpsa: optimize cmd_alloc function by remembering last allocation

Empirically, this improves performance slightly (~2% max IOPS) by
allowing cmd_alloc to remember where it left off searching for
free commands between calls instead of always starting its search
at command 0.

Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/hpsa.c
drivers/scsi/hpsa.h