From patchwork Mon Nov 9 01:57:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 7579981 Return-Path: X-Original-To: patchwork-linux-arm@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 0D8D09F1C2 for ; Mon, 9 Nov 2015 02:00:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B5F42066A for ; Mon, 9 Nov 2015 02:00:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4082A20606 for ; Mon, 9 Nov 2015 02:00:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZvbjG-0007pY-8e; Mon, 09 Nov 2015 01:58:42 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zvbix-0007A3-1L for linux-arm-kernel@lists.infradead.org; Mon, 09 Nov 2015 01:58:24 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 79B7413FF0F; Mon, 9 Nov 2015 01:58:07 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 66925140209; Mon, 9 Nov 2015 01:58:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from drakthul.qualcomm.com (rrcs-67-52-130-30.west.biz.rr.com [67.52.130.30]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 59CC013FF0F; Mon, 9 Nov 2015 01:58:05 +0000 (UTC) From: Sinan Kaya To: linux-scsi@vger.kernel.org, timur@codeaurora.org, cov@codeaurora.org, jcm@redhat.com Subject: [PATCH V2 3/3] scsi: mptxsas: offload IRQ execution Date: Sun, 8 Nov 2015 20:57:46 -0500 Message-Id: <1447034266-28003-4-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1447034266-28003-1-git-send-email-okaya@codeaurora.org> References: <1447034266-28003-1-git-send-email-okaya@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151108_175823_183605_A5C7FE67 X-CRM114-Status: GOOD ( 12.04 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Abhijit Mahajan , Nagalakshmi Nandigama , linux-arm-msm@vger.kernel.org, "James E.J. Bottomley" , linux-kernel@vger.kernel.org, Sreekanth Reddy , Sinan Kaya , Praveen Krishnamoorthy , agross@codeaurora.org, MPT-FusionLinux.pdl@avagotech.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The mpt2sas and mpt3sas drivers are spinning forever in their IRQ handlers if there are a lot of jobs queued up by the PCIe card. This handler is causing spikes for the rest of the system and sluggish behavior. Marking all MSI interrupts as non-shared and moving the MSI interrupts to thread context. This relexes the rest of the system execution. Signed-off-by: Sinan Kaya --- drivers/scsi/mpt2sas/mpt2sas_base.c | 12 ++++++++---- drivers/scsi/mpt3sas/mpt3sas_base.c | 13 +++++++++---- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index c61c82a..b619a0e 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -1359,14 +1359,18 @@ _base_request_irq(struct MPT2SAS_ADAPTER *ioc, u8 index, u32 vector) cpumask_clear(reply_q->affinity_hint); atomic_set(&reply_q->busy, 0); - if (ioc->msix_enable) + if (ioc->msix_enable) { snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-msix%d", MPT2SAS_DRIVER_NAME, ioc->id, index); - else + r = request_threaded_irq(vector, NULL, _base_interrupt, + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + reply_q->name, reply_q); + } else { snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d", MPT2SAS_DRIVER_NAME, ioc->id); - r = request_irq(vector, _base_interrupt, IRQF_SHARED, reply_q->name, - reply_q); + r = request_irq(vector, _base_interrupt, IRQF_SHARED, + reply_q->name, reply_q); + } if (r) { printk(MPT2SAS_ERR_FMT "unable to allocate interrupt %d!\n", reply_q->name, vector); diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 6dc391c..62bee43 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -1661,14 +1661,19 @@ _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index, u32 vector) cpumask_clear(reply_q->affinity_hint); atomic_set(&reply_q->busy, 0); - if (ioc->msix_enable) + if (ioc->msix_enable) { snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d-msix%d", MPT3SAS_DRIVER_NAME, ioc->id, index); - else + + r = request_threaded_irq(vector, NULL, _base_interrupt, + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + reply_q->name, reply_q); + } else { snprintf(reply_q->name, MPT_NAME_LENGTH, "%s%d", MPT3SAS_DRIVER_NAME, ioc->id); - r = request_irq(vector, _base_interrupt, IRQF_SHARED, reply_q->name, - reply_q); + r = request_irq(vector, _base_interrupt, IRQF_SHARED, + reply_q->name, reply_q); + } if (r) { pr_err(MPT3SAS_FMT "unable to allocate interrupt %d!\n", reply_q->name, vector);