]> git.baikalelectronics.ru Git - kernel.git/commit
Drivers: hv: vmbus: Optimize vmbus_on_event
authorSaurabh Sengar <ssengar@linux.microsoft.com>
Mon, 25 Jul 2022 09:37:28 +0000 (02:37 -0700)
committerWei Liu <wei.liu@kernel.org>
Fri, 23 Sep 2022 09:27:17 +0000 (09:27 +0000)
commit5ee934285761006671cd0a54b3de025cccf3c1fc
tree26b2f1343454921ad4d62682500f6eb6038b4fc1
parent05bef87d4e52d4941084179068f4fb24ca7c702c
Drivers: hv: vmbus: Optimize vmbus_on_event

In the vmbus_on_event loop, 2 jiffies timer will not serve the purpose if
callback_fn takes longer. For effective use move this check inside of
callback functions where needed. Out of all the VMbus drivers using
vmbus_on_event, only storvsc has a high packet volume, thus add this limit
only in storvsc callback for now.
There is no apparent benefit of loop itself because this tasklet will be
scheduled anyway again if there are packets left in ring buffer. This
patch removes this unnecessary loop as well.

Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1658741848-4210-1-git-send-email-ssengar@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/connection.c
drivers/scsi/storvsc_drv.c