]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
storvsc: Tighten up the interrupt path
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 23 Dec 2015 21:15:51 +0000 (13:15 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 6 Jan 2016 20:56:17 +0000 (15:56 -0500)
commit03996f2064a5c5b7c1bd942794d622179acf2d61
treecd07b66915e27358e807fe4faa127f5e70dbb991
parent59635018f9b7ae8b3e304d7a5da6f628b5a1dcf6
storvsc: Tighten up the interrupt path

On the interrupt path, we repeatedly establish the pointer to the
storvsc_device. While the compiler does inline get_in_stor_device() (and
other static functions) in the call chain in the interrupt path, the
compiler is repeatedly inlining the call to get_in_stor_device() each
time it is invoked.  The return value of get_in_stor_device() can be
cached in the interrupt path since there is higher level serialization
in place to ensure correct handling when the module unload races with
the processing of an incoming message from the host.  Optimize this code
path by caching the pointer to storvsc_device and passing it as an
argument.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Long Li <longli@microsoft.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/storvsc_drv.c