From patchwork Tue Jun 16 05:37:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 6613171 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1E797C0020 for ; Tue, 16 Jun 2015 05:37:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E478207B1 for ; Tue, 16 Jun 2015 05:37:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B11D207AA for ; Tue, 16 Jun 2015 05:37:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753911AbbFPFh2 (ORCPT ); Tue, 16 Jun 2015 01:37:28 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:36610 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753900AbbFPFhX (ORCPT ); Tue, 16 Jun 2015 01:37:23 -0400 Received: by pdjm12 with SMTP id m12so6292839pdj.3 for ; Mon, 15 Jun 2015 22:37:23 -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; bh=ioPMtfS8StOE17biXrTT+MJIemcQ1fkGlGy3kiDB2P0=; b=S3Uzmk9zjSm8La7jJspXuxDfQeH6MUV3ud9tgvOGfXcx+GtlEhAiC5xyQtqXiGqjxb xJD0wwoniHP6trW9vPsdkauL/T619twfGNIEeJBK/OAG2QsRVX8946oRTJwxxnkcqFO+ /knxjfjBazB+/zXa0UgGX0oxxu2wri/dZFwFI= 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; bh=ioPMtfS8StOE17biXrTT+MJIemcQ1fkGlGy3kiDB2P0=; b=LHWMBmdBhxk/79Natf3/A/8KuK8Sp8EZs6j/FBojc2c8dGay55c+DS6c+yhmuVlZNi U85gGszYh8qQz7L44Aks6gIGLJLMp2cogv0WHpATDs+Qgyj/Col0BwvdcQXRTztWgH8n saC7VaDe+BwfyNKE/0ujPzhvqixwNU1XW9VF8QwvjFGVunNZxpyitpnE+IMnStq8KDeN D1pWeQhGuPPGVTVL2mLwCcj6PQlkAntoeitk7UxmCs9BCCFeHPDkn3ppOvXziwopxK6G 6Ywsa/WIhjmL6vf0cYcNAIXwIGH03JZvnkH8qiLUEwgAddZbbfnkK4Z3UvLR8jmbzBQ4 9JnA== X-Gm-Message-State: ALoCoQmRbzBMcu17wu9TyojZktoBrzXYivn+0WobI64V2NgG4vEw5c5I1hBQ5imrbPoLTRcxB9cY X-Received: by 10.67.23.3 with SMTP id hw3mr56475486pad.67.1434433042864; Mon, 15 Jun 2015 22:37:22 -0700 (PDT) Received: from host1.lsi.com ([192.19.239.250]) by mx.google.com with ESMTPSA id pd10sm14043282pdb.66.2015.06.15.22.37.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Jun 2015 22:37:21 -0700 (PDT) From: Sreekanth Reddy X-Google-Original-From: Sreekanth Reddy To: jejb@kernel.org, hch@infradead.org, jthumshirn@suse.de, joe.lawrence@stratus.com 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 v1] [SCSI] mpt3sas: Use alloc_ordered_workqueue() API instead of create_singlethread_workqueue() API Date: Tue, 16 Jun 2015 11:07:07 +0530 Message-Id: <1434433027-40682-1-git-send-email-Sreekanth.Reddy@avagotech.com> X-Mailer: git-send-email 2.0.2 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.2 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. Signed-off-by: Sreekanth Reddy Reviewed-by: Joe Lawrence Reviewed-by: Martin K. Petersen --- 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 b848458..7e5926c 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -8085,8 +8085,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__);