Skip to contentSkip to conversation

scsi: storvsc: Reduce default ring buffer size to 128 Kbytes

PATCH Applied Michael Kelley 3 participants 3 messages Apr 1, 2019 – Apr 4, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: storvsc: Reduce default ring buffer size to 128 Kbytes

Reduce the default VMbus channel ring buffer size for storvsc SCSI devices from 1 Mbyte to 128 Kbytes. Measurements show that ring buffer sizes above 128 Kbytes do not increase performance even at very high IOPS rates, so don't waste the memory. Also remove the dependence on PAGE_SIZE, since the ring buffer size should not change on architectures where PAGE_SIZE is not 4 Kbytes.

---
 drivers/scsi/storvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/storvsc_drv.c +1 -1
index fbaa11a..f85517d 100644
@@ -385,7 +385,7 @@ enum storvsc_request_type {
  * This is the end of Protocol specific defines.
  */
 
-static int storvsc_ringbuffer_size = (256 * PAGE_SIZE);
+static int storvsc_ringbuffer_size = (128 * 1024);
 static u32 max_outstanding_req_per_channel;
 
 static int storvsc_vcpus_per_sub_channel = 4;
Signature · 1 line
1.8.3.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines

-----Original Message-----
From: [email protected] <linux-hyperv- [email protected]> On Behalf Of Michael Kelley
Sent: Monday, April 1, 2019 5:42 PM
To: KY Srinivasan <[email protected]>; [email protected]; Long Li <[email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]
Cc: Michael Kelley <[email protected]>
Subject: [PATCH 1/1] scsi: storvsc: Reduce default ring buffer size to 128 Kbytes

Quoted 7 lines

Reduce the default VMbus channel ring buffer size for storvsc SCSI devices from 1 Mbyte to 128 Kbytes. Measurements show that ring buffer sizes above 128 Kbytes do not increase performance even at very high IOPS rates, so don't waste the memory. Also remove the dependence on PAGE_SIZE, since the ring buffer size should not change on architectures where PAGE_SIZE is not 4 Kbytes.

Thank you.

#2 lore raw
In reply to Michael Kelley

Michael,

Quoted 6 lines

Reduce the default VMbus channel ring buffer size for storvsc SCSI devices from 1 Mbyte to 128 Kbytes. Measurements show that ring buffer sizes above 128 Kbytes do not increase performance even at very high IOPS rates, so don't waste the memory. Also remove the dependence on PAGE_SIZE, since the ring buffer size should not change on architectures where PAGE_SIZE is not 4 Kbytes.

Applied to 5.1/scsi-fixes, thanks.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering