linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Remove deprecated create_singlethread_workqueue
@ 2016-08-30 17:12 Bhaktipriya Shridhar
  2016-08-31 12:48 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Bhaktipriya Shridhar @ 2016-08-30 17:12 UTC (permalink / raw)
  To: Marcel Holtmann, Gustavo Padovan, Johan Hedberg
  Cc: Tejun Heo, linux-bluetooth, linux-kernel

The workqueue "workqueue" queues multiple work items viz &qca->ws_awake_rx
&qca->ws_rx_vote_off, &qca->ws_awake_device, &qca->ws_tx_vote_off which
require strict execution ordering. Hence, an ordered dedicated workqueue
has been used to replace the deprecated create_singlethread_workqueue
instance.

WQ_MEM_RECLAIM has not been set since the driver is not being used on a
memory reclaim path.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
 drivers/bluetooth/hci_qca.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 683c2b6..6c867fb 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -397,7 +397,7 @@ static int qca_open(struct hci_uart *hu)
 	skb_queue_head_init(&qca->txq);
 	skb_queue_head_init(&qca->tx_wait_q);
 	spin_lock_init(&qca->hci_ibs_lock);
-	qca->workqueue = create_singlethread_workqueue("qca_wq");
+	qca->workqueue = alloc_ordered_workqueue("qca_wq", 0);
 	if (!qca->workqueue) {
 		BT_ERR("QCA Workqueue not initialized properly");
 		kfree(qca);
--
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: Remove deprecated create_singlethread_workqueue
  2016-08-30 17:12 [PATCH] Bluetooth: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
@ 2016-08-31 12:48 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2016-08-31 12:48 UTC (permalink / raw)
  To: Bhaktipriya Shridhar
  Cc: Gustavo F. Padovan, Johan Hedberg, Tejun Heo, linux-bluetooth,
	linux-kernel

Hi Bhaktipriya,

> The workqueue "workqueue" queues multiple work items viz &qca->ws_awake_rx
> &qca->ws_rx_vote_off, &qca->ws_awake_device, &qca->ws_tx_vote_off which
> require strict execution ordering. Hence, an ordered dedicated workqueue
> has been used to replace the deprecated create_singlethread_workqueue
> instance.
> 
> WQ_MEM_RECLAIM has not been set since the driver is not being used on a
> memory reclaim path.
> 
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
> ---
> drivers/bluetooth/hci_qca.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-31 12:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 17:12 [PATCH] Bluetooth: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
2016-08-31 12:48 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).