From patchwork Mon Aug 31 20:48:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 7101491 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 62F849F32B for ; Mon, 31 Aug 2015 20:48:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BB11206A4 for ; Mon, 31 Aug 2015 20:48:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A55A8206A3 for ; Mon, 31 Aug 2015 20:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753160AbbHaUs3 (ORCPT ); Mon, 31 Aug 2015 16:48:29 -0400 Received: from mail-qk0-f171.google.com ([209.85.220.171]:34345 "EHLO mail-qk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752860AbbHaUs0 (ORCPT ); Mon, 31 Aug 2015 16:48:26 -0400 Received: by qkct7 with SMTP id t7so16740000qkc.1 for ; Mon, 31 Aug 2015 13:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=avagotech.com; s=google; h=date:from:to:subject:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=UsVgbRTNYpv6cbELpNohsICdRzn7r1cJbfrSbylI8fc=; b=N4ZQri+neB2hjEuNxnIp7phfI/X5e1PQNw9ucTYHJmnb5gHj4J0xPBZv7NWTpFU4j+ ziEMF6qy3ZTIAg7jyQN6C9Kn1Ni73s6owo4Vkud21L1FpJIC6NcxE11qPlTPcG0HxF1a VaMKzbXDBr3ChNqHist/bou3IXz2D2skV14Ek= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=UsVgbRTNYpv6cbELpNohsICdRzn7r1cJbfrSbylI8fc=; b=Kv0w0j57CWbpE/vQq17+1w8LUQLxjGMsn3bWBD2ORSNMzNI7atV+T+VnwL03qxeZiV 8XDgJ3X3KWtyeLoMrO3L0Jg4K3XQSwN02ZIsjba6eNskddf950x53aaDi+Lm8LiMc3XM 5mqt+k3Dd8P8x8o9TlDxrlIgQgWm1005GNLFsWyOzvzjg4qOuHM/FRuxELPUG0vpyY37 MIxxY+7KuOZpy9V31yF9+Zpkf7gB+lZn4ezx6bnL38yVFSG4ax/k8hlkJo+M1BjgYlfp zqPGgzQsfyzkf+NMoA6wKvDi7PonGYVIgKGe8Sa7bxB6sLj1kAzQkrAUe8njLzxpT/6K 5ATw== X-Gm-Message-State: ALoCoQn7ti67POgMJ3zkAhrxSj3fLoj9hG8ZvG7Matn2dVgkHzLZ6CmvvHSkabo9bNLahjOttnFi X-Received: by 10.55.33.222 with SMTP id f91mr12909169qki.64.1441054105501; Mon, 31 Aug 2015 13:48:25 -0700 (PDT) Received: from myfc17 (c-75-67-235-135.hsd1.nh.comcast.net. [75.67.235.135]) by smtp.gmail.com with ESMTPSA id k5sm9529141qkl.15.2015.08.31.13.48.24 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 31 Aug 2015 13:48:24 -0700 (PDT) Date: Mon, 31 Aug 2015 16:48:10 -0400 From: james.smart@avagotech.com (James Smart) To: linux-scsi@vger.kernel.org Subject: [PATCH 03/14] lpfc: in sli3 use configured sg_seg_cnt for sg_tablesize Message-ID: <55e4bd8a.9Holn3dFdEAEsMk9%james.smart@avagotech.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,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 From: Bodo Stroesser Hi James, We had some performance problems with RAID systems connected to LPe12k. AFAICS, the reason is a small bug in lpfc.ko, causing the IO-size to be smaller than expected. The patch below fixes it for us. Please CC me, I'm not on the list. Best regards Bodo ------------------------------------------------------ Currently the module parameter lpfc_sg_seg_count does not have effect for sli3 devices. In lpfc_sli_driver_resource_setup(), which is used for sli3, the code writes the configured sg_seg_cnt into lpfc_template.sg_tablesize. But lpfc_template is the template used for sli4 only. Thus the value should correctly be written to lpfc_template_s3->sg_tablesize. This patch is for kernel 4.1-rc5, but is tested with lpfc 10.2.405.26 only. Signed-off-by: Bodo Stroesser Signed-off-by: James Smart Reviewed-by: Sebastian Herbszt Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index da9b6fc..81bfb2d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4994,7 +4994,7 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) /* Initialize the host templates the configured values. */ lpfc_vport_template.sg_tablesize = phba->cfg_sg_seg_cnt; - lpfc_template.sg_tablesize = phba->cfg_sg_seg_cnt; + lpfc_template_s3.sg_tablesize = phba->cfg_sg_seg_cnt; /* There are going to be 2 reserved BDEs: 1 FCP cmnd + 1 FCP rsp */ if (phba->cfg_enable_bg) {