From patchwork Thu Mar 3 14:02:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 12767469 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED955C433F5 for ; Thu, 3 Mar 2022 13:51:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233772AbiCCNwi (ORCPT ); Thu, 3 Mar 2022 08:52:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230384AbiCCNwh (ORCPT ); Thu, 3 Mar 2022 08:52:37 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C81A18A7AA for ; Thu, 3 Mar 2022 05:51:51 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id t19so1031376plr.5 for ; Thu, 03 Mar 2022 05:51:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version; bh=MWOK+gixXJX4NeVIpPL8YjzwrYMDMq3x89FHvMWMcXc=; b=DPGm+MsLMCo0jeLzAvPOR5ThESHU87Du7FSTFUinkQVp9zY8SvAbh60B7cLHv683SX R0XIOnSbetk2Vq1ZlxLh5Hln6bVeX0OkuqV6t48ZLO671QFU8fjJ2RM7lSXr0GIlzFgi p38S7zGk2iCR7hzuYevhFezV606p1z2sUYjDw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=MWOK+gixXJX4NeVIpPL8YjzwrYMDMq3x89FHvMWMcXc=; b=MhjoRpKifRlV3KtsW4jdpqGrYfeLeJxhZtdPAhyDQzs2sP1f213En9deJI1FwaaQqq 0DnzGJ7/KVnzy5ErdzDl833QY21TtVIWtcCKSfEbyq+n6VQ0kFp30ZazeplDBx0XTDIg PuqfHobLRlJKBgSEeBwgtx+6gDy+7P0/Y6ksNwgHmft1d4la91uqx9aUBrLAUwmXQ9ko Vobvu2OdZ2fzV0U79kyhlF4IZ9xx6xixH8DjRKeA6IUXxvZaBdDuPCtNMxUlDi8dC8gU /uh/QikuDBezMmySpN9abdve7ioZs5VWIX7fKXO5Lvr9QLUo2+h1EXdrknpQABtGV/Ua /Q7A== X-Gm-Message-State: AOAM532eAm2CBqJK66IAcE/G9dhL8Q9Y4vodTzCDyhgjiPak4WudQK7I rBiXfX7Ejs6hV8e1ugy6ORRCgEkE2C3Nbb3Dvc3NS1daVkwxFxSlTN382LsZ4XqZNZeG1Y+CHc0 LoKErVCodZA2o9FGLDGE3k/CLkY0rzd/NOOTeDE+9HggdU3ooEFw3xQ4hAGlj2mXqURXzoAfHAG NE7NlD4T2fC3M= X-Google-Smtp-Source: ABdhPJyKV7CMKhoemC4YoxWMXmEJvbKIlO/lGo4QUo4vULmhAZ1B1Q08ewqzQDQXqLB6aTsbPIHJpQ== X-Received: by 2002:a17:902:9887:b0:151:6e1c:7082 with SMTP id s7-20020a170902988700b001516e1c7082mr18707178plp.162.1646315510530; Thu, 03 Mar 2022 05:51:50 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id oa2-20020a17090b1bc200b001bcff056f09sm2346740pjb.13.2022.03.03.05.51.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 05:51:49 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, Sreekanth Reddy Subject: [PATCH] mpt3sas: Remove scsi_dma_map errors messages Date: Thu, 3 Mar 2022 19:32:03 +0530 Message-Id: <20220303140203.12642-1-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org When scsi_dma_map() fails by returning a sges_left value less than zero, the amount of logging can be extremely high. In a recent end-user environment, 1200 messages per second were being sent to the log buffer. This eventually overwhelmed the system and it stalled. Also these error messages are not needed and hence removing them. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 511726f92d9a..ebb61b47dc2f 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -2593,12 +2593,8 @@ _base_check_pcie_native_sgl(struct MPT3SAS_ADAPTER *ioc, /* Get the SG list pointer and info. */ sges_left = scsi_dma_map(scmd); - if (sges_left < 0) { - sdev_printk(KERN_ERR, scmd->device, - "scsi_dma_map failed: request for %d bytes!\n", - scsi_bufflen(scmd)); + if (sges_left < 0) return 1; - } /* Check if we need to build a native SG list. */ if (!base_is_prp_possible(ioc, pcie_device, @@ -2705,12 +2701,8 @@ _base_build_sg_scmd(struct MPT3SAS_ADAPTER *ioc, sg_scmd = scsi_sglist(scmd); sges_left = scsi_dma_map(scmd); - if (sges_left < 0) { - sdev_printk(KERN_ERR, scmd->device, - "scsi_dma_map failed: request for %d bytes!\n", - scsi_bufflen(scmd)); + if (sges_left < 0) return -ENOMEM; - } sg_local = &mpi_request->SGL; sges_in_segment = ioc->max_sges_in_main_message; @@ -2853,12 +2845,8 @@ _base_build_sg_scmd_ieee(struct MPT3SAS_ADAPTER *ioc, sg_scmd = scsi_sglist(scmd); sges_left = scsi_dma_map(scmd); - if (sges_left < 0) { - sdev_printk(KERN_ERR, scmd->device, - "scsi_dma_map failed: request for %d bytes!\n", - scsi_bufflen(scmd)); + if (sges_left < 0) return -ENOMEM; - } sg_local = &mpi_request->SGL; sges_in_segment = (ioc->request_sz -