From patchwork Fri Jun 23 09:40:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yadan Fan X-Patchwork-Id: 9806099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B82746086C for ; Fri, 23 Jun 2017 09:41:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3024285DA for ; Fri, 23 Jun 2017 09:41:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96CD3285E6; Fri, 23 Jun 2017 09:41:02 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 16C4C285DA for ; Fri, 23 Jun 2017 09:41:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754658AbdFWJku (ORCPT ); Fri, 23 Jun 2017 05:40:50 -0400 Received: from victor.provo.novell.com ([137.65.250.26]:40303 "EHLO prv3-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753972AbdFWJki (ORCPT ); Fri, 23 Jun 2017 05:40:38 -0400 Received: from linux-a17u.apac.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (TLS encrypted); Fri, 23 Jun 2017 03:40:29 -0600 From: Yadan Fan To: don.brace@microsemi.com, martin.petersen@oracle.com, jejb@linux.vnet.ibm.com Cc: esc.storagedev@microsemi.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Yadan Fan Subject: [PATCH v2 2/2] smartpqi: limit transfer length to 1MB Date: Fri, 23 Jun 2017 17:40:06 +0800 Message-Id: <20170623094006.16807-2-ydfan@suse.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170623094006.16807-1-ydfan@suse.com> References: <20170623094006.16807-1-ydfan@suse.com> 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 The smartpqi firmware will bypass the cache for any request larger than 1MB, so we should cap the request size to avoid any performance degradation in kernels later than v4.3 This degradation is caused from d2be537c3ba3568acd79cd178327b842e60d035e, which changed max_sectors_kb to 1280k, but the hardware is able to work fine with it, so the true fix should be from smartpqi driver. Signed-off-by: Yadan Fan Reviewed-by: Johannes Thumshirn --- drivers/scsi/smartpqi/smartpqi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/smartpqi/smartpqi.h b/drivers/scsi/smartpqi/smartpqi.h index b673825f46b5..9513357bd472 100644 --- a/drivers/scsi/smartpqi/smartpqi.h +++ b/drivers/scsi/smartpqi/smartpqi.h @@ -630,7 +630,7 @@ struct pqi_encryption_info { }; #define PQI_MAX_OUTSTANDING_REQUESTS ((u32)~0) -#define PQI_MAX_TRANSFER_SIZE (4 * 1024U * 1024U) +#define PQI_MAX_TRANSFER_SIZE (1024U * 1024U) #define RAID_MAP_MAX_ENTRIES 1024