From patchwork Fri Apr 22 11:23:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitra P B X-Patchwork-Id: 8910381 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 919E99F1C1 for ; Fri, 22 Apr 2016 11:23:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A76D22021B for ; Fri, 22 Apr 2016 11:23:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D382620160 for ; Fri, 22 Apr 2016 11:23:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752246AbcDVLXs (ORCPT ); Fri, 22 Apr 2016 07:23:48 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35332 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752830AbcDVLXq (ORCPT ); Fri, 22 Apr 2016 07:23:46 -0400 Received: by mail-pf0-f176.google.com with SMTP id n1so40671053pfn.2 for ; Fri, 22 Apr 2016 04:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DfSaAC1dc4vjOni+EEf1C1y504xBwolhUe/3Kl74xGE=; b=HQPZsz8Cl+pGTnnkrCJsRlF/DIWoaqjAsBLKQKhlqbdLC/xBo84mZav7ENY/99NHxA nRwZFm1qeIELyR8gC+9HCOx7R9jxYaZtJCNc398O8A1Oi24jL1u9LYXuIn7jJ3HNyKFA DUATMooM9X4cI2yJu+lEmsh/mnuMMgWal6OlY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DfSaAC1dc4vjOni+EEf1C1y504xBwolhUe/3Kl74xGE=; b=UUeNRMQiYLMC9/o24hwYRVlrkCz/3z1RZ/rQd5W5sMKHsxzUXtBhFf3QJ0s44cndK9 hkcvwnQPv9maD8hqaSrO4hLaOSnIzlFeXawI8K2/VStchxSvu+o+XGQz1XhstEhuURbO jJkMKNA+tB5tI+dpJVQ9kt+p0o7WbLKImZyQhKa7RYdzb7NFsFCER8Ze7LtzU37jAYly W6OjxK40+xx8s6PsCkKGiLMmommVXGMXHYwKidlGO/IAtWT1NSSE1Z+SlO4CWTcWpdZT 0la/uwabSVn4ypJNBdrBJKr8S5qLttL/OqFscCBrPr3kAwqSiRLDts6Cxsk8jbbh8lIL ySog== X-Gm-Message-State: AOPr4FWQsCPXezH7HoyHhk896HK74BOEubDu0HZhYBPULpcRlmrmoN0yBZJPns6Tb3Q8WatU X-Received: by 10.98.80.206 with SMTP id g75mr27639224pfj.127.1461324225753; Fri, 22 Apr 2016 04:23:45 -0700 (PDT) Received: from host1.dhcp.avagotech.net ([192.19.239.250]) by smtp.gmail.com with ESMTPSA id w20sm7780283pfi.31.2016.04.22.04.23.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Apr 2016 04:23:45 -0700 (PDT) From: Chaitra P B To: jejb@kernel.org, hch@infradead.org Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, JBottomley@Parallels.com, Sathya.Prakash@broadcom.com, suganath-prabu.subramani@broadcom.com, linux-kernel@vger.kernel.org, Chaitra P B Subject: [PATCH 4/5] mpt3sas: Set maximum transfer length per IO to 4MB for VDs Date: Fri, 22 Apr 2016 16:53:13 +0530 Message-Id: <1461324194-5789-5-git-send-email-chaitra.basappa@broadcom.com> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1461324194-5789-1-git-send-email-chaitra.basappa@broadcom.com> References: <1461324194-5789-1-git-send-email-chaitra.basappa@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 Set maximum transfer length per IO on RAID volumes to 4MB by setting VD's queue's max_sector to 8192. Signed-off-by: Chaitra P B --- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 ++ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index 32580b5..a16e7f9 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -112,6 +112,8 @@ #define MPT3SAS_SAS_QUEUE_DEPTH 254 #define MPT3SAS_RAID_QUEUE_DEPTH 128 +#define MPT3SAS_RAID_MAX_SECTORS 8192 + #define MPT_NAME_LENGTH 32 /* generic length of strings */ #define MPT_STRING_LENGTH 64 diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 0fea937..abd8717 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -1911,6 +1911,14 @@ scsih_slave_configure(struct scsi_device *sdev) (unsigned long long)raid_device->wwid, raid_device->num_pds, ds); + if (shost->max_sectors > MPT3SAS_RAID_MAX_SECTORS) { + blk_queue_max_hw_sectors(sdev->request_queue, + MPT3SAS_RAID_MAX_SECTORS); + sdev_printk(KERN_INFO, sdev, + "Set queue's max_sector to: %u\n", + MPT3SAS_RAID_MAX_SECTORS); + } + scsih_change_queue_depth(sdev, qdepth); /* raid transport support */