linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] scsi: storvsc: Reduce default ring buffer size to 128 Kbytes
@ 2019-04-01 21:42 Michael Kelley
  2019-04-02 15:58 ` Haiyang Zhang
  2019-04-04  3:31 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Kelley @ 2019-04-01 21:42 UTC (permalink / raw)
  To: KY Srinivasan, martin.petersen@oracle.com, Long Li,
	James.Bottomley@hansenpartnership.com, emilne@redhat.com,
	linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org
  Cc: Michael Kelley

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.

Signed-off-by: Michael Kelley <mikelley@microsoft.com>
---
 drivers/scsi/storvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index fbaa11a..f85517d 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -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;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH 1/1] scsi: storvsc: Reduce default ring buffer size to 128 Kbytes
  2019-04-01 21:42 [PATCH 1/1] scsi: storvsc: Reduce default ring buffer size to 128 Kbytes Michael Kelley
@ 2019-04-02 15:58 ` Haiyang Zhang
  2019-04-04  3:31 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Haiyang Zhang @ 2019-04-02 15:58 UTC (permalink / raw)
  To: Michael Kelley, KY Srinivasan, martin.petersen@oracle.com,
	Long Li, James.Bottomley@hansenpartnership.com, emilne@redhat.com,
	linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org
  Cc: Michael Kelley



> -----Original Message-----
> From: linux-hyperv-owner@vger.kernel.org <linux-hyperv-
> owner@vger.kernel.org> On Behalf Of Michael Kelley
> Sent: Monday, April 1, 2019 5:42 PM
> To: KY Srinivasan <kys@microsoft.com>; martin.petersen@oracle.com; Long Li
> <longli@microsoft.com>; James.Bottomley@hansenpartnership.com;
> emilne@redhat.com; linux-hyperv@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-scsi@vger.kernel.org
> Cc: Michael Kelley <mikelley@microsoft.com>
> Subject: [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.
> 
> Signed-off-by: Michael Kelley <mikelley@microsoft.com>

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] scsi: storvsc: Reduce default ring buffer size to 128 Kbytes
  2019-04-01 21:42 [PATCH 1/1] scsi: storvsc: Reduce default ring buffer size to 128 Kbytes Michael Kelley
  2019-04-02 15:58 ` Haiyang Zhang
@ 2019-04-04  3:31 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2019-04-04  3:31 UTC (permalink / raw)
  To: Michael Kelley
  Cc: KY Srinivasan, martin.petersen@oracle.com, Long Li,
	James.Bottomley@hansenpartnership.com, emilne@redhat.com,
	linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org


Michael,

> 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.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-04  3:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-01 21:42 [PATCH 1/1] scsi: storvsc: Reduce default ring buffer size to 128 Kbytes Michael Kelley
2019-04-02 15:58 ` Haiyang Zhang
2019-04-04  3:31 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).