From patchwork Fri May 6 08:59:30 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: 9030341 Return-Path: X-Original-To: patchwork-linux-scsi@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 8D126BF440 for ; Fri, 6 May 2016 09:00:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFEA82035D for ; Fri, 6 May 2016 09:00:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ED03120390 for ; Fri, 6 May 2016 09:00:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758239AbcEFJAS (ORCPT ); Fri, 6 May 2016 05:00:18 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35494 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758202AbcEFJAM (ORCPT ); Fri, 6 May 2016 05:00:12 -0400 Received: by mail-pa0-f49.google.com with SMTP id iv1so45501744pac.2 for ; Fri, 06 May 2016 02:00:12 -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=rmwCOPPHV5+dtTfDjgVuOCe8ojc5pYGgXjpPaom6aJ0=; b=bklFOEBvdtKXEhnU527p9mypmsTeGaxx4Mc5G4MpANB2APbHw16aPQiVNyOgCR9hu3 W/eIREOcsm85cvgMML4ngxgUR7m0ZzjlFW0oznplWZviEPyvk0UJQsXh6d5AIhYvamG7 Q0dI5XeUdjQ5dWeYhEaL3BgzcBD10+HB0MWPA= 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=rmwCOPPHV5+dtTfDjgVuOCe8ojc5pYGgXjpPaom6aJ0=; b=jT5qMSlSKxyNf/+S1d/txsRFKSJ4w7JIg3XLkm1kMW4aTRmuRrl50uyKCuyga2T/+b rEsnhK6xyv5l06A5LZhc7jqJjI6Q5FstwjIRDG0SASjIf3FFTiVZaoF3SS418GgDtltf LXzejNQefxhD0jm8q7HtR6Jox8uGz6x7SwcnvD0UVDmLvhYWgyCSzZSJDLquC89sp0Go r5zyp2KfCD11bPirEFhogqJeQRmbKJo1P+nQegWXeHONZB74qOeJ6MEupAA+quhqIXsg v41E8/qLMEWonXOicn7bNRsOAyaDZVOirL6Z/YU4D3P9l94myP7T4ZIOiT/PAnSOgVQG uwwQ== X-Gm-Message-State: AOPr4FWnDJ2d1visbtUFlVx+TiT2hBlN4JokA05Mii+jpeWEnT96R1Fmw3qE4M6m1xi5VR1D X-Received: by 10.67.1.233 with SMTP id bj9mr27175765pad.46.1462525212020; Fri, 06 May 2016 02:00:12 -0700 (PDT) Received: from host1.dhcp.avagotech.net ([192.19.239.250]) by smtp.gmail.com with ESMTPSA id b64sm19272399pfa.48.2016.05.06.02.00.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 May 2016 02:00:11 -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 5/6] mpt3sas: Set maximum transfer length per IO to 4MB for VDs Date: Fri, 6 May 2016 14:29:30 +0530 Message-Id: <1462525171-6877-6-git-send-email-chaitra.basappa@broadcom.com> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1462525171-6877-1-git-send-email-chaitra.basappa@broadcom.com> References: <1462525171-6877-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=-8.9 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 Reviewed-by: Tomas Henzl --- 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 aa918aa..e1befba 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 */