]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
workqueue: mark WQ_NON_REENTRANT deprecated
authorTejun Heo <tj@kernel.org>
Tue, 30 Jul 2013 12:30:16 +0000 (08:30 -0400)
committerTejun Heo <tj@kernel.org>
Tue, 30 Jul 2013 12:30:16 +0000 (08:30 -0400)
dbf2576e37 ("workqueue: make all workqueues non-reentrant") made
WQ_NON_REENTRANT no-op but the following patches didn't remove the
flag or update the documentation.  Let's mark the flag deprecated and
update the documentation accordingly.

Signed-off-by: Tejun Heo <tj@kernel.org>
Documentation/workqueue.txt
include/linux/workqueue.h

index a6ab4b62d9261cc9b7690076019fe3bec04a79b4..67113f622880fd55a4858e9bc07283a3d4d1fe5d 100644 (file)
@@ -100,8 +100,8 @@ Subsystems and drivers can create and queue work items through special
 workqueue API functions as they see fit. They can influence some
 aspects of the way the work items are executed by setting flags on the
 workqueue they are putting the work item on. These flags include
-things like CPU locality, reentrancy, concurrency limits, priority and
-more.  To get a detailed overview refer to the API description of
+things like CPU locality, concurrency limits, priority and more.  To
+get a detailed overview refer to the API description of
 alloc_workqueue() below.
 
 When a work item is queued to a workqueue, the target gcwq and
@@ -166,16 +166,6 @@ resources, scheduled and executed.
 
 @flags:
 
-  WQ_NON_REENTRANT
-
-       By default, a wq guarantees non-reentrance only on the same
-       CPU.  A work item may not be executed concurrently on the same
-       CPU by multiple workers but is allowed to be executed
-       concurrently on multiple CPUs.  This flag makes sure
-       non-reentrance is enforced across all CPUs.  Work items queued
-       to a non-reentrant wq are guaranteed to be executed by at most
-       one worker system-wide at any given time.
-
   WQ_UNBOUND
 
        Work items queued to an unbound wq are served by a special
@@ -233,6 +223,10 @@ resources, scheduled and executed.
 
        This flag is meaningless for unbound wq.
 
+Note that the flag WQ_NON_REENTRANT no longer exists as all workqueues
+are now non-reentrant - any work item is guaranteed to be executed by
+at most one worker system-wide at any given time.
+
 @max_active:
 
 @max_active determines the maximum number of execution contexts per
index a0ed78ab54d74b3f60450745fd98c5bf1491e12c..594521ba0d43f73e887375968006429c9ec19502 100644 (file)
@@ -295,7 +295,12 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
  * Documentation/workqueue.txt.
  */
 enum {
-       WQ_NON_REENTRANT        = 1 << 0, /* guarantee non-reentrance */
+       /*
+        * 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 */