]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: storvsc: Select channel based on available percentage of ring buffer to write
authorLong Li <longli@microsoft.com>
Thu, 19 Apr 2018 21:54:24 +0000 (14:54 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Apr 2018 19:38:38 +0000 (15:38 -0400)
commitc4e0414db69b0fd3f53e3ca757a5d6389cd44ce1
treea6fd09143ed5f3201d03b5801579f778c4f54a31
parente9695a069cc55598225f1d6691039ad577b0c427
scsi: storvsc: Select channel based on available percentage of ring buffer to write

This is a best effort for estimating on how busy the ring buffer is for
that channel, based on available buffer to write in percentage. It is
still possible that at the time of actual ring buffer write, the space
may not be available due to other processes may be writing at the time.

Selecting a channel based on how full it is can reduce the possibility
that a ring buffer write will fail, and avoid the situation a channel is
over busy.

Now it's possible that storvsc can use a smaller ring buffer size
(e.g. 40k bytes) to take advantage of cache locality.

Signed-off-by: Long Li <longli@microsoft.com>
Reviewed-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/storvsc_drv.c