From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751454AbcFRIob (ORCPT ); Sat, 18 Jun 2016 04:44:31 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:33283 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751404AbcFRIo1 (ORCPT ); Sat, 18 Jun 2016 04:44:27 -0400 Date: Sat, 18 Jun 2016 14:14:23 +0530 From: Bhaktipriya Shridhar To: "K. Y. Srinivasan" , Haiyang Zhang Cc: Tejun Heo , devel@linuxdriverproject.org, linux-kernel@vger.kernel.org Subject: [PATCH] Drivers: hv: connection: Remove create_workqueue Message-ID: <20160618084423.GA8865@Karyakshetra> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org alloc_workqueue replaces deprecated create_workqueue(). A dedicated workqueue has been used since the workitem (viz &ctx->work, which maps to vmbus_onmessage_work), is engaged in normal device operation which involves invoking the handler for channel protocol messages. WQ_MEM_RECLAIM has been set to guarantee forward progress under memory pressure, which is a requirement in this case. Since there are only a fixed number of work items, explicit concurrency limit is unnecessary here. Signed-off-by: Bhaktipriya Shridhar --- drivers/hv/connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index fcf8a02..a292b85 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -147,7 +147,8 @@ int vmbus_connect(void) /* Initialize the vmbus connection */ vmbus_connection.conn_state = CONNECTING; - vmbus_connection.work_queue = create_workqueue("hv_vmbus_con"); + vmbus_connection.work_queue = alloc_workqueue("hv_vmbus_con", + WQ_MEM_RECLAIM, 0); if (!vmbus_connection.work_queue) { ret = -ENOMEM; goto cleanup; -- 2.1.4