From patchwork Mon Apr 1 21:42:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael Kelley (LINUX)" X-Patchwork-Id: 10880675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1444217E1 for ; Mon, 1 Apr 2019 21:42:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3BDA2640A for ; Mon, 1 Apr 2019 21:42:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7EAB2889C; Mon, 1 Apr 2019 21:42:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AD53285D9 for ; Mon, 1 Apr 2019 21:42:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726030AbfDAVmK (ORCPT ); Mon, 1 Apr 2019 17:42:10 -0400 Received: from mail-eopbgr680116.outbound.protection.outlook.com ([40.107.68.116]:30320 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725869AbfDAVmJ (ORCPT ); Mon, 1 Apr 2019 17:42:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=diFycp73/ZGoMwjdzH4cfUBAZnFR2eu7IdeQx2+X/wim9GoMC7zyF4qBv7kxAu1fUgkZa52UUk9ci3sTVqYlGxQhFzqRJBPIi7uFFV66s3wNC3WtgdMC15LIq/URVl65IQwwhyn+5HTXUc0GMj3uxApCat5q4VPqSs03j1d0N3M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yrYS48m0KXxj+LmB4P+7nY/g7cOUF/peQxHLZcrQdv4=; b=DuxvjUGZR/SoK/nKSWitOlKqR1FlCk9jesOpFAD0UYwn2YGbiqg/EaDwBG6I8aVfAqUbNQZE/7v/GjdwkCxObrqUFIq/TnQuaUKQUE1yZMLSFq5a35DLEsrIEicVGjZleF1fBfrfDuiMtE9CklFyaUDnB0Ei3fJx4lyut9pyU0o= ARC-Authentication-Results: i=1; test.office365.com 1;dmarc=none action=none header.from=microsoft.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yrYS48m0KXxj+LmB4P+7nY/g7cOUF/peQxHLZcrQdv4=; b=Pgc4BlOEgpBI9NzFI4w1N2ggukqQ7V2ofwoTmooasWqW7oqDDig12EJU/DbFqyrDbJ/GXDGVeitLrrWELEUHGJSPJf/dWo+noHk2tCSeD5fR8ffinRWj/vlm/R819yu7zKc3vAMmZI0SDWtiZfyfe6udI3+Cg1cOWsxnr8amlyA= Received: from BN6PR21MB0466.namprd21.prod.outlook.com (10.172.111.144) by BN6PR21MB0851.namprd21.prod.outlook.com (10.173.205.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.2; Mon, 1 Apr 2019 21:42:07 +0000 Received: from BN6PR21MB0466.namprd21.prod.outlook.com ([fe80::f458:691d:54a:b05c]) by BN6PR21MB0466.namprd21.prod.outlook.com ([fe80::f458:691d:54a:b05c%14]) with mapi id 15.20.1771.002; Mon, 1 Apr 2019 21:42:07 +0000 From: Michael Kelley 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 Subject: [PATCH 1/1] scsi: storvsc: Reduce default ring buffer size to 128 Kbytes Thread-Topic: [PATCH 1/1] scsi: storvsc: Reduce default ring buffer size to 128 Kbytes Thread-Index: AQHU6NPAwqy3b0fRgku3jt+SxDRaiw== Date: Mon, 1 Apr 2019 21:42:06 +0000 Message-ID: <1554154871-10305-1-git-send-email-mikelley@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR20CA0025.namprd20.prod.outlook.com (2603:10b6:300:ed::11) To BN6PR21MB0466.namprd21.prod.outlook.com (2603:10b6:404:b2::16) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 1.8.3.1 x-originating-ip: [131.107.159.8] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 86fa72c8-3515-40b5-6b53-08d6b6eae290 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:BN6PR21MB0851; x-ms-traffictypediagnostic: BN6PR21MB0851: authentication-results: spf=none (sender IP is ) smtp.mailfrom=mikelley@microsoft.com; x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 0994F5E0C5 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(366004)(346002)(376002)(136003)(199004)(189003)(81166006)(81156014)(8676002)(6116002)(3846002)(10090500001)(14454004)(2906002)(1511001)(478600001)(486006)(2616005)(66066001)(52116002)(36756003)(26005)(386003)(6506007)(68736007)(102836004)(476003)(6486002)(106356001)(86612001)(71200400001)(71190400001)(186003)(6512007)(107886003)(256004)(4326008)(97736004)(25786009)(14444005)(2201001)(4744005)(5660300002)(6436002)(10290500003)(8936002)(2501003)(50226002)(110136005)(22452003)(105586002)(53936002)(7736002)(305945005)(99286004)(86362001)(4720700003)(316002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR21MB0851;H:BN6PR21MB0466.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 8jbeh5j00DFaZg8s4QcRv57Lz9WbdZzeHfbl68mtWi+wTRDoecv+EuF2gokqA3vwJnOqP03JjpH4C3mKoVBGP0U+7AnTxm4tWH/gOueCb8qyCgXE0cYeaFd6vDETfcazFzp6pwzCHpEd4kOpRdtqUwCmvpAuYUSyI1bw11fppA11d1Oi6+EOgWzB5X5Z6Np0z+nyISpblb0gwUZBCW5ZpEKBdb5G0vVqP7lJNyKOXWX+u8OVthU8mS2XtsNAiU/5QyyS5JwJxNRBX/5NeXlUGNGSpF0MX2wcb+JGS0jneFujFFQ16kqdgsgGqAsM0OV7yiDl9KxUbUBYUARB6m0r01Re4WdK2SVTIN21WvWCrJcBUT1T5991lnVaTga5hwU8EhGUtzy0YeRiNWNJHlU8Eob6SfZGB0gCwkMi9DsHvzs= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86fa72c8-3515-40b5-6b53-08d6b6eae290 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Apr 2019 21:42:07.1692 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR21MB0851 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Haiyang Zhang --- 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;