diff options
author | Tejun Heo <tj@kernel.org> | 2013-07-30 08:30:16 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-07-30 08:30:16 -0400 |
commit | 1207637304990374231fe4e9aeb527904f4ec1e6 (patch) | |
tree | a855a753d1765e6dad52f819a7b540672bd716cc | |
parent | ad81f0545ef01ea651886dddac4bef6cec930092 (diff) |
workqueue: mark WQ_NON_REENTRANT deprecated
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>
-rw-r--r-- | Documentation/workqueue.txt | 18 | ||||
-rw-r--r-- | include/linux/workqueue.h | 7 |
2 files changed, 12 insertions, 13 deletions
diff --git a/Documentation/workqueue.txt b/Documentation/workqueue.txt index a6ab4b62d926..67113f622880 100644 --- a/Documentation/workqueue.txt +++ b/Documentation/workqueue.txt | |||
@@ -100,8 +100,8 @@ Subsystems and drivers can create and queue work items through special | |||
100 | workqueue API functions as they see fit. They can influence some | 100 | workqueue API functions as they see fit. They can influence some |
101 | aspects of the way the work items are executed by setting flags on the | 101 | aspects of the way the work items are executed by setting flags on the |
102 | workqueue they are putting the work item on. These flags include | 102 | workqueue they are putting the work item on. These flags include |
103 | things like CPU locality, reentrancy, concurrency limits, priority and | 103 | things like CPU locality, concurrency limits, priority and more. To |
104 | more. To get a detailed overview refer to the API description of | 104 | get a detailed overview refer to the API description of |
105 | alloc_workqueue() below. | 105 | alloc_workqueue() below. |
106 | 106 | ||
107 | When a work item is queued to a workqueue, the target gcwq and | 107 | When a work item is queued to a workqueue, the target gcwq and |
@@ -166,16 +166,6 @@ resources, scheduled and executed. | |||
166 | 166 | ||
167 | @flags: | 167 | @flags: |
168 | 168 | ||
169 | WQ_NON_REENTRANT | ||
170 | |||
171 | By default, a wq guarantees non-reentrance only on the same | ||
172 | CPU. A work item may not be executed concurrently on the same | ||
173 | CPU by multiple workers but is allowed to be executed | ||
174 | concurrently on multiple CPUs. This flag makes sure | ||
175 | non-reentrance is enforced across all CPUs. Work items queued | ||
176 | to a non-reentrant wq are guaranteed to be executed by at most | ||
177 | one worker system-wide at any given time. | ||
178 | |||
179 | WQ_UNBOUND | 169 | WQ_UNBOUND |
180 | 170 | ||
181 | Work items queued to an unbound wq are served by a special | 171 | Work items queued to an unbound wq are served by a special |
@@ -233,6 +223,10 @@ resources, scheduled and executed. | |||
233 | 223 | ||
234 | This flag is meaningless for unbound wq. | 224 | This flag is meaningless for unbound wq. |
235 | 225 | ||
226 | Note that the flag WQ_NON_REENTRANT no longer exists as all workqueues | ||
227 | are now non-reentrant - any work item is guaranteed to be executed by | ||
228 | at most one worker system-wide at any given time. | ||
229 | |||
236 | @max_active: | 230 | @max_active: |
237 | 231 | ||
238 | @max_active determines the maximum number of execution contexts per | 232 | @max_active determines the maximum number of execution contexts per |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index a0ed78ab54d7..594521ba0d43 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -295,7 +295,12 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } | |||
295 | * Documentation/workqueue.txt. | 295 | * Documentation/workqueue.txt. |
296 | */ | 296 | */ |
297 | enum { | 297 | enum { |
298 | WQ_NON_REENTRANT = 1 << 0, /* guarantee non-reentrance */ | 298 | /* |
299 | * All wqs are now non-reentrant making the following flag | ||
300 | * meaningless. Will be removed. | ||
301 | */ | ||
302 | WQ_NON_REENTRANT = 1 << 0, /* DEPRECATED */ | ||
303 | |||
299 | WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ | 304 | WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ |
300 | WQ_FREEZABLE = 1 << 2, /* freeze during suspend */ | 305 | WQ_FREEZABLE = 1 << 2, /* freeze during suspend */ |
301 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ | 306 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ |