mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
To: "K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>
Cc: Tejun Heo <tj@kernel.org>,
	devel@linuxdriverproject.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Drivers: hv: connection: Remove create_workqueue
Date: Sat, 18 Jun 2016 14:14:23 +0530	[thread overview]
Message-ID: <20160618084423.GA8865@Karyakshetra> (raw)

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 <bhaktipriya96@gmail.com>
---
 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

             reply	other threads:[~2016-06-18  8:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-18  8:44 Bhaktipriya Shridhar [this message]
2016-06-20 15:09 ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160618084423.GA8865@Karyakshetra \
    --to=bhaktipriya96@gmail.com \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome