From patchwork Fri Jun 12 09:42:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 6596741 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 665819F326 for ; Fri, 12 Jun 2015 09:44:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71C822067D for ; Fri, 12 Jun 2015 09:44:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B3DE20685 for ; Fri, 12 Jun 2015 09:44:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932280AbbFLJoU (ORCPT ); Fri, 12 Jun 2015 05:44:20 -0400 Received: from mail-qc0-f172.google.com ([209.85.216.172]:32824 "EHLO mail-qc0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932639AbbFLJoP (ORCPT ); Fri, 12 Jun 2015 05:44:15 -0400 Received: by qcnj1 with SMTP id j1so8930953qcn.0 for ; Fri, 12 Jun 2015 02:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=avagotech.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=M27PDSW8ENSjeDsgh4jdbn+ET8sqbH4CXpIIAJFDfb0=; b=bZbzwkKV7Hvk/awVPEXEaJwz0lyu21hZ2CpvkQXpLaMRvpjOM+2G3ttMflP4PNQhby VoJlXzLeOuJhM8p76A+2mTPTIfo4qOEEOLJu+MsTzM4Rbu36RzgeSblDgWsCp4n6WUFK FNvzMOVxreKCeSvWy6f6wdHJ+Sg42VTPEAcrA= 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=M27PDSW8ENSjeDsgh4jdbn+ET8sqbH4CXpIIAJFDfb0=; b=Bdn1rrhgv7TGbITksWbzN0UQoGM+wGSyRSCgOxcaTQ/cQ/aGUhG+U7LJmR73Ow76mo fThVzxSVK1YOkMSRlThRIraTUJMXZ20iZqmJDrn1XfUcH3I0uzejE1QsuIW9kV2Vh+M+ GBi3LvYem1/iTBw44ZlXIC5BRGkbefZQE3s4E/VhZNZTE+D7AdJWgV8F8Ufe9cvgZVvo ZOs3uWsj6wqx3ESiyyVmK78SWEmQPb7WK4tH3dcABNUfp2Bx/Edl1Hr5ePwqw2KfuTwI BQt6U+hvo1W0j+V0yfa03aAk6V3KOqp+1/99LQVlOuaqzFvYjZbchdarjFddPEyQSMt0 mS1g== X-Gm-Message-State: ALoCoQmP+ZHqpRXrKFQwwjBM27GqUaTxUPB8soHZpaJYUlDa6b216ZrboYOsk0oqVFydOZDh0CCG X-Received: by 10.140.23.5 with SMTP id 5mr17061157qgo.106.1434102254679; Fri, 12 Jun 2015 02:44:14 -0700 (PDT) Received: from host1.lsi.com ([192.19.239.250]) by mx.google.com with ESMTPSA id 18sm1466219qgh.40.2015.06.12.02.44.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jun 2015 02:44:13 -0700 (PDT) From: Sreekanth Reddy X-Google-Original-From: Sreekanth Reddy To: jejb@kernel.org, hch@infradead.org Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, JBottomley@Parallels.com, Sathya.Prakash@avagotech.com, linux-kernel@vger.kernel.org, Sreekanth Reddy Subject: [PATCH 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API Date: Fri, 12 Jun 2015 15:12:29 +0530 Message-Id: <1434102153-38581-18-git-send-email-Sreekanth.Reddy@avagotech.com> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1434102153-38581-1-git-send-email-Sreekanth.Reddy@avagotech.com> References: <1434102153-38581-1-git-send-email-Sreekanth.Reddy@avagotech.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=-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 Created a thread using alloc_ordered_workqueue() API in order to process the works from firmware Work-queue sequentially instead of create_singlethread_workqueue() API. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 837c22a..42bb731 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -8024,8 +8024,13 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id) /* event thread */ snprintf(ioc->firmware_event_name, sizeof(ioc->firmware_event_name), "fw_event%d", ioc->id); - ioc->firmware_event_thread = create_singlethread_workqueue( +#if defined(alloc_ordered_workqueue) + ioc->firmware_event_thread = alloc_ordered_workqueue( + ioc->firmware_event_name, WQ_MEM_RECLAIM); +#else + ioc->firmware_event_thread = create_singlethread_workqueue( ioc->firmware_event_name); +#endif if (!ioc->firmware_event_thread) { pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", ioc->name, __FILE__, __LINE__, __func__);