Skip to contentSkip to conversation

workqueue: WQ_NON_REENTRANT is meaningless and going away

PATCH Applied ZhangZhen 4 participants 5 messages Mar 27, 2014 – Mar 29, 2014 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore

ZhangZhen

author
#1 lore raw

PATCH 1/1 workqueue: WQ_NON_REENTRANT is meaningless and going away

In reply to a message not in the archive

Tejun Heo has made WQ_NON_REENTRANT useless in the commit:dbf2576e37 ("workqueue: make all workqueues non-reentrant"). So remove its usages.

This patch doesn't introduce any behavior changes.

---
 drivers/mmc/host/dw_mmc.c |    2 +-
 include/linux/workqueue.h |    6 ------
 net/l2tp/l2tp_core.c      |    2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)
drivers/mmc/host/dw_mmc.c +1 -1
index 55cd110..c204b7d 100644
@@ -2607,7 +2607,7 @@ int dw_mci_probe(struct dw_mci *host)
 
 	tasklet_init(&host->tasklet, dw_mci_tasklet_func, (unsigned long)host);
 	host->card_workqueue = alloc_workqueue("dw-mci-card",
-			WQ_MEM_RECLAIM | WQ_NON_REENTRANT, 1);
+			WQ_MEM_RECLAIM, 1);
 	if (!host->card_workqueue) {
 		ret = -ENOMEM;
 		goto err_dmaunmap;
include/linux/workqueue.h +0 -6
index 594521b..57b2687 100644
@@ -295,12 +295,6 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
  * Documentation/workqueue.txt.
  */
 enum {
-	/*
-	 * All wqs are now non-reentrant making the following flag
-	 * meaningless.  Will be removed.
-	 */
-	WQ_NON_REENTRANT	= 1 << 0, /* DEPRECATED */
-
 	WQ_UNBOUND		= 1 << 1, /* not bound to any cpu */
 	WQ_FREEZABLE		= 1 << 2, /* freeze during suspend */
 	WQ_MEM_RECLAIM		= 1 << 3, /* may be used for memory reclaim */
net/l2tp/l2tp_core.c +1 -1
index 735d0f6..fcbd63e 100644
@@ -2016,7 +2016,7 @@ static int __init l2tp_init(void)
 	if (rc)
 		goto out;
 
-	l2tp_wq = alloc_workqueue("l2tp", WQ_NON_REENTRANT | WQ_UNBOUND, 0);
+	l2tp_wq = alloc_workqueue("l2tp", WQ_UNBOUND, 0);
 	if (!l2tp_wq) {
 		pr_err("alloc_workqueue failed\n");
 		rc = -ENOMEM;
Signature · 14 lines
1.6.0.2


.




_______________________________________________
kernel.openeuler mailing list
[email protected]
http://rnd-openeuler.huawei.com/mailman/listinfo/kernel.openeuler

.
maintainer
#2 lore raw
Quoted 6 lines · ZhangZhen

Tejun Heo has made WQ_NON_REENTRANT useless in the commit:dbf2576e37 ("workqueue: make all workqueues non-reentrant"). So remove its usages.

This patch doesn't introduce any behavior changes.

James, Chris, can you guys please ack this? I think it'd be best to route it through workqueue branch.

Thanks.

Quoted 49 lines
---
 drivers/mmc/host/dw_mmc.c |    2 +-
 include/linux/workqueue.h |    6 ------
 net/l2tp/l2tp_core.c      |    2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)
drivers/mmc/host/dw_mmc.c +1 -1
index 55cd110..c204b7d 100644
@@ -2607,7 +2607,7 @@ int dw_mci_probe(struct dw_mci *host)
 
 	tasklet_init(&host->tasklet, dw_mci_tasklet_func, (unsigned long)host);
 	host->card_workqueue = alloc_workqueue("dw-mci-card",
-			WQ_MEM_RECLAIM | WQ_NON_REENTRANT, 1);
+			WQ_MEM_RECLAIM, 1);
 	if (!host->card_workqueue) {
 		ret = -ENOMEM;
 		goto err_dmaunmap;
include/linux/workqueue.h +0 -6
index 594521b..57b2687 100644
@@ -295,12 +295,6 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
  * Documentation/workqueue.txt.
  */
 enum {
-	/*
-	 * All wqs are now non-reentrant making the following flag
-	 * meaningless.  Will be removed.
-	 */
-	WQ_NON_REENTRANT	= 1 << 0, /* DEPRECATED */
-
 	WQ_UNBOUND		= 1 << 1, /* not bound to any cpu */
 	WQ_FREEZABLE		= 1 << 2, /* freeze during suspend */
 	WQ_MEM_RECLAIM		= 1 << 3, /* may be used for memory reclaim */
net/l2tp/l2tp_core.c +1 -1
index 735d0f6..fcbd63e 100644
@@ -2016,7 +2016,7 @@ static int __init l2tp_init(void)
 	if (rc)
 		goto out;
 
-	l2tp_wq = alloc_workqueue("l2tp", WQ_NON_REENTRANT | WQ_UNBOUND, 0);
+	l2tp_wq = alloc_workqueue("l2tp", WQ_UNBOUND, 0);
 	if (!l2tp_wq) {
 		pr_err("alloc_workqueue failed\n");
 		rc = -ENOMEM;
Signature · 1 line
tejun
Acked-by
#3 lore raw
In reply to Tejun Heo
Quoted 4 lines · Tejun Heo
Quoted 3 lines · ZhangZhen

Tejun Heo has made WQ_NON_REENTRANT useless in the commit:dbf2576e37 ("workqueue: make all workqueues non-reentrant"). So remove its usages.

Quoted 8 lines
Quoted 3 lines

This patch doesn't introduce any behavior changes.

James, Chris, can you guys please ack this? I think it'd be best to route it through workqueue branch.

Thanks.

Please, go ahead and take it through the workqueue branch.

Quoted 57 lines
Quoted 42 lines
---
 drivers/mmc/host/dw_mmc.c |    2 +-
 include/linux/workqueue.h |    6 ------
 net/l2tp/l2tp_core.c      |    2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)
drivers/mmc/host/dw_mmc.c +1 -1
index 55cd110..c204b7d 100644
@@ -2607,7 +2607,7 @@ int dw_mci_probe(struct dw_mci *host)
 
      tasklet_init(&host->tasklet, dw_mci_tasklet_func, (unsigned long)host);
      host->card_workqueue = alloc_workqueue("dw-mci-card",
-                     WQ_MEM_RECLAIM | WQ_NON_REENTRANT, 1);
+                     WQ_MEM_RECLAIM, 1);
      if (!host->card_workqueue) {
              ret = -ENOMEM;
              goto err_dmaunmap;
include/linux/workqueue.h +0 -6
index 594521b..57b2687 100644
@@ -295,12 +295,6 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
  * Documentation/workqueue.txt.
  */
 enum {
-     /*
-      * All wqs are now non-reentrant making the following flag
-      * meaningless.  Will be removed.
-      */
-     WQ_NON_REENTRANT        = 1 << 0, /* DEPRECATED */
-
      WQ_UNBOUND              = 1 << 1, /* not bound to any cpu */
      WQ_FREEZABLE            = 1 << 2, /* freeze during suspend */
      WQ_MEM_RECLAIM          = 1 << 3, /* may be used for memory reclaim */
net/l2tp/l2tp_core.c +0 -0
index 735d0f6..fcbd63e 100644

net/l2tp/l2tp_core.c static int __init l2tp_init(void) · line 2022

Quoted 8 lines
net/l2tp/l2tp_core.c +1 -1
@@ -2016,7 +2016,7 @@ static int __init l2tp_init(void)
      if (rc)
              goto out;
 
-     l2tp_wq = alloc_workqueue("l2tp", WQ_NON_REENTRANT | WQ_UNBOUND, 0);
+     l2tp_wq = alloc_workqueue("l2tp", WQ_UNBOUND, 0);
      if (!l2tp_wq) {
              pr_err("alloc_workqueue failed\n");
              rc = -ENOMEM;

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer Applied
#5 lore raw
In reply to ZhangZhen
Quoted 6 lines · ZhangZhen

Tejun Heo has made WQ_NON_REENTRANT useless in the commit:dbf2576e37 ("workqueue: make all workqueues non-reentrant"). So remove its usages.

This patch doesn't introduce any behavior changes.

Applied to wq/for-3.15.

Thanks.

Signature · 1 line
tejun