From patchwork Wed Dec 16 22:53:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Martin K. Petersen" X-Patchwork-Id: 7866531 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 23F47BEEE5 for ; Wed, 16 Dec 2015 22:54:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59DCB203C0 for ; Wed, 16 Dec 2015 22:54:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7AB6E203A5 for ; Wed, 16 Dec 2015 22:53:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752815AbbLPWx7 (ORCPT ); Wed, 16 Dec 2015 17:53:59 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:40812 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145AbbLPWx6 (ORCPT ); Wed, 16 Dec 2015 17:53:58 -0500 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tBGMruQj018768 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 16 Dec 2015 22:53:57 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id tBGMruLv016877 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 16 Dec 2015 22:53:56 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id tBGMruKu008879; Wed, 16 Dec 2015 22:53:56 GMT Received: from mellowmood.mkp.net (/10.156.108.201) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 16 Dec 2015 14:53:55 -0800 From: "Martin K. Petersen" To: linux-scsi@vger.kernel.org, linux-block@vger.kernel.org Cc: "Martin K. Petersen" Subject: [PATCH 1/3] scsi_debug: Increase the reported optimal transfer length Date: Wed, 16 Dec 2015 17:53:51 -0500 Message-Id: <1450306433-20166-1-git-send-email-martin.petersen@oracle.com> X-Mailer: git-send-email 2.5.0 X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The OPTIMAL TRANSFER LENGTH reported by scsi_debug is 64 blocks which translates to 32KB with the default logical block size. That's much lower than what real storage devices typically report (256KB to 1MB). Bump the optimal transfer length to 1024 blocks. Signed-off-by: Martin K. Petersen Acked-by: Douglas Gilbert Reviewed-by: Ewan D. Milne --- drivers/scsi/scsi_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index d09d60293c27..b80b037f2982 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -129,7 +129,7 @@ static const char *scsi_debug_version_date = "20141022"; #define DEF_NO_LUN_0 0 #define DEF_NUM_PARTS 0 #define DEF_OPTS 0 -#define DEF_OPT_BLKS 64 +#define DEF_OPT_BLKS 1024 #define DEF_PHYSBLK_EXP 0 #define DEF_PTYPE 0 #define DEF_REMOVABLE false @@ -4140,7 +4140,7 @@ MODULE_PARM_DESC(no_lun_0, "no LU number 0 (def=0 -> have lun 0)"); MODULE_PARM_DESC(no_uld, "stop ULD (e.g. sd driver) attaching (def=0))"); MODULE_PARM_DESC(num_parts, "number of partitions(def=0)"); MODULE_PARM_DESC(num_tgts, "number of targets per host to simulate(def=1)"); -MODULE_PARM_DESC(opt_blks, "optimal transfer length in block (def=64)"); +MODULE_PARM_DESC(opt_blks, "optimal transfer length in blocks (def=1024)"); MODULE_PARM_DESC(opts, "1->noise, 2->medium_err, 4->timeout, 8->recovered_err... (def=0)"); MODULE_PARM_DESC(physblk_exp, "physical block exponent (def=0)"); MODULE_PARM_DESC(ptype, "SCSI peripheral type(def=0[disk])");