From patchwork Tue Jun 30 06:55:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 6693871 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 9F5BB9F3D1 for ; Tue, 30 Jun 2015 06:57:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C60A8205D4 for ; Tue, 30 Jun 2015 06:57:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E348C205CA for ; Tue, 30 Jun 2015 06:56:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753351AbbF3G44 (ORCPT ); Tue, 30 Jun 2015 02:56:56 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:36288 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753306AbbF3G4i (ORCPT ); Tue, 30 Jun 2015 02:56:38 -0400 Received: by paceq1 with SMTP id eq1so631015pac.3 for ; Mon, 29 Jun 2015 23:56:37 -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=ORjBiBCpHDBRSuBOOTGH+qevbK2TpN1oj8VA6yyvcYI=; b=grbzwpcr7i7JXLeShbaBEqlXWMlnQxfneDxJnsFZaUlfH8G5usKTVP1dDUS/YgC+AL myYu6M9AOAaZOo4CorkANCafvSAIENl0qX3UegtKr2W1pjUK8S2jU1PulBV09UIIY+bZ Q0d9QHzGSqDGIe/rCoeUGrT+h8bnvpBS/mhuo= 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=ORjBiBCpHDBRSuBOOTGH+qevbK2TpN1oj8VA6yyvcYI=; b=EA1YM2Ipcsu308DJJ17J4YvrgN5VYMNM07pUGB8eiP70j2Cc7kcGjOhjsRl6YqLYE+ +hbvI5cQBUwrp8u1gGbUPBxy99LQryFAj8JQd+KwVLljTlrYk/BBQWsU+rhOdHgGl42h BJVfV6vJbGVlBf0+xf7qFJUrmVigBlduLHgHTthpWQ+KZJGyObyzqUht/Enh6t21SbdM nGg2aEGKVwSC0n2Gu2J3m4Uxqry49YC3ZEcjVjPMqUZpqG2LBUID13+Ha3Wa+2Jjgsoz EIii1ZP6y/cz5nksl3ll1MNHvM39Jxg/HZhT76gMp44UKV06E/sL/T1YKcvCEEBzPYuh KlEA== X-Gm-Message-State: ALoCoQnBoDmAf3pFMUjbZnAcDp8Q3CY+QVkn/V2KiV++yP6cM+Nd+3dG6FuIgKty/l76+qBOjMJW X-Received: by 10.68.134.226 with SMTP id pn2mr40136318pbb.86.1435647397544; Mon, 29 Jun 2015 23:56:37 -0700 (PDT) Received: from host1.lsi.com ([192.19.239.250]) by mx.google.com with ESMTPSA id 1sm935543pds.79.2015.06.29.23.56.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Jun 2015 23:56:36 -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, jthumshirn@suse.de, Sreekanth Reddy Subject: [PATCH v2 17/20] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API Date: Tue, 30 Jun 2015 12:25:03 +0530 Message-Id: <1435647306-36956-18-git-send-email-Sreekanth.Reddy@avagotech.com> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1435647306-36956-1-git-send-email-Sreekanth.Reddy@avagotech.com> References: <1435647306-36956-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=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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. Changes in v1: No need to check for backport compatibility in the upstream kernel. so removing the else section where driver use create_singlethread_workqueue() API if alloc_ordered_workqueue() API is not defined, This else section is not required since in the latest upstream kernel this alloc_ordered_workqueue() API is always defined. Changes in v2: Patch version change only. Signed-off-by: Sreekanth Reddy Reviewed-by: Martin K. Petersen Reviewed-by: Joe Lawrence --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 49c412b..a136ec8 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -8024,8 +8024,8 @@ _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( - ioc->firmware_event_name); + ioc->firmware_event_thread = alloc_ordered_workqueue( + ioc->firmware_event_name, WQ_MEM_RECLAIM); if (!ioc->firmware_event_thread) { pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n", ioc->name, __FILE__, __LINE__, __func__);