From patchwork Tue Jun 7 21:17:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhaktipriya Shridhar X-Patchwork-Id: 9162639 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 28CE960467 for ; Tue, 7 Jun 2016 21:17:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 062852836E for ; Tue, 7 Jun 2016 21:17:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDAC628370; Tue, 7 Jun 2016 21:17:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 941AA2836E for ; Tue, 7 Jun 2016 21:17:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933175AbcFGVRx (ORCPT ); Tue, 7 Jun 2016 17:17:53 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36226 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932773AbcFGVRv (ORCPT ); Tue, 7 Jun 2016 17:17:51 -0400 Received: by mail-pf0-f196.google.com with SMTP id 62so21357503pfd.3; Tue, 07 Jun 2016 14:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=4IN0NYa7nwjm64wNg5dfN69RyrxygYKuVNr3tumazMw=; b=W17xHuaz4qNbGNyUwRqmH9eynTUOWcjRvuXeCE6wpcZJsxhA5HjMKsnsNtjKWlw6fT 0ZLt46XvLL9KZytAVQGHgCmgWbXFcxPOZmQkZleenlH8Gj7Phs8jQibQN7VpSbVkhlFE oaCMVxSAODgh5C/KsRSW7qGdQHqrngqzC84j8PFc/AP8+zAEl17Zemo9nMYGg+xbq2uI BQw24WedkKXNDJg0VNFuZZ9jzC6Qa2ocenfxCPdH91E/E/WKFvsIyp914ok4DRmm2odq JjaFuJFg3mcZ+bTtdKXtrJ4TQRys6MIKzmVxl+NBEef8pX1wGxvFV6txXsS+G8moFNQg jsyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=4IN0NYa7nwjm64wNg5dfN69RyrxygYKuVNr3tumazMw=; b=WEECdPX+hvD5l4bXHeqHpFhFj5SJDbGYNkJfKIPl2G8lfRFGPM/EKC0rdSvOaXU9iL KQM3ofCjAVYCwUm9WWGzQ/tOlL/aR0ANshuxt1cRc+GjKp+1i76YH5g7cp9K/lyvmLHL Cjawk9JEPCYg+7dv1MasxJMOQLuhu0FEnYnV+qS3NYKZRwtVnd6IxO8hfNpwseS5YzYc 7YgtFKhmexa29P3Uo/4VUNJHZcvIBVG1FGlYOQutEtyoIxp14JmsORapz0bGOEdO7dkU AUdzYK1v9+NFnSYPnsszGRrM50k96XOh67FX9NGPhhFvEzpUBcFzLdB6caAtquPfWAZZ oNPQ== X-Gm-Message-State: ALyK8tLJLvo8ca/ndEWFQmYRjipxfw7xV+1gBJiTp6ujQk+Rr6sdVrofwMsWOPiHb8y9yQ== X-Received: by 10.98.41.133 with SMTP id p127mr1594286pfp.18.1465334271135; Tue, 07 Jun 2016 14:17:51 -0700 (PDT) Received: from Karyakshetra ([1.23.6.72]) by smtp.gmail.com with ESMTPSA id h23sm14529782pfk.75.2016.06.07.14.17.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jun 2016 14:17:50 -0700 (PDT) Date: Wed, 8 Jun 2016 02:47:47 +0530 From: Bhaktipriya Shridhar To: Tadeusz Struk , Herbert Xu , "David S. Miller" , Julia Lawall , Conor McLoughlin , Pingchao Yang , Ahsan Atta , John Griffin , Wu Fengguang Cc: Tejun Heo , qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: qat: Remove deprecated create_workqueue Message-ID: <20160607211746.GA17667@Karyakshetra> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP alloc_workqueue replaces deprecated create_workqueue(). The workqueue device_reset_wq has workitem &reset_data->reset_work per adf_reset_dev_data. The workqueue pf2vf_resp_wq is a workqueue for PF2VF responses has workitem &pf2vf_resp->pf2vf_resp_work per pf2vf_resp. The workqueue adf_vf_stop_wq is used to call adf_dev_stop() asynchronously. Dedicated workqueues have been used in all cases since the workitems on the workqueues are involved in operation of crypto which can be used in the IO path which is depended upon during memory reclaim. Hence, WQ_MEM_RECLAIM has been set to gurantee forward progress under memory pressure. Since there are only a fixed number of work items, explicit concurrency limit is unnecessary. Signed-off-by: Bhaktipriya Shridhar Acked-by: Tejun Heo --- drivers/crypto/qat/qat_common/adf_aer.c | 3 ++- drivers/crypto/qat/qat_common/adf_sriov.c | 2 +- drivers/crypto/qat/qat_common/adf_vf_isr.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/crypto/qat/qat_common/adf_aer.c b/drivers/crypto/qat/qat_common/adf_aer.c index b40d9c8..7bfb57f 100644 --- a/drivers/crypto/qat/qat_common/adf_aer.c +++ b/drivers/crypto/qat/qat_common/adf_aer.c @@ -243,7 +243,8 @@ EXPORT_SYMBOL_GPL(adf_disable_aer); int adf_init_aer(void) { - device_reset_wq = create_workqueue("qat_device_reset_wq"); + device_reset_wq = alloc_workqueue("qat_device_reset_wq", + WQ_MEM_RECLAIM, 0); return !device_reset_wq ? -EFAULT : 0; } diff --git a/drivers/crypto/qat/qat_common/adf_sriov.c b/drivers/crypto/qat/qat_common/adf_sriov.c index 4a526e2..9320ae1 100644 --- a/drivers/crypto/qat/qat_common/adf_sriov.c +++ b/drivers/crypto/qat/qat_common/adf_sriov.c @@ -292,7 +292,7 @@ EXPORT_SYMBOL_GPL(adf_sriov_configure); int __init adf_init_pf_wq(void) { /* Workqueue for PF2VF responses */ - pf2vf_resp_wq = create_workqueue("qat_pf2vf_resp_wq"); + pf2vf_resp_wq = alloc_workqueue("qat_pf2vf_resp_wq", WQ_MEM_RECLAIM, 0); return !pf2vf_resp_wq ? -ENOMEM : 0; } diff --git a/drivers/crypto/qat/qat_common/adf_vf_isr.c b/drivers/crypto/qat/qat_common/adf_vf_isr.c index aa689ca..bf99e11 100644 --- a/drivers/crypto/qat/qat_common/adf_vf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_vf_isr.c @@ -321,7 +321,7 @@ EXPORT_SYMBOL_GPL(adf_vf_isr_resource_alloc); int __init adf_init_vf_wq(void) { - adf_vf_stop_wq = create_workqueue("adf_vf_stop_wq"); + adf_vf_stop_wq = alloc_workqueue("adf_vf_stop_wq", WQ_MEM_RECLAIM, 0); return !adf_vf_stop_wq ? -EFAULT : 0; }