diff options
| -rw-r--r-- | include/linux/workqueue.h | 4 | ||||
| -rw-r--r-- | kernel/workqueue.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 1ac11586a2f..de6a755befa 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -286,11 +286,15 @@ enum { | |||
| 286 | * any specific CPU, not concurrency managed, and all queued works are | 286 | * any specific CPU, not concurrency managed, and all queued works are |
| 287 | * executed immediately as long as max_active limit is not reached and | 287 | * executed immediately as long as max_active limit is not reached and |
| 288 | * resources are available. | 288 | * resources are available. |
| 289 | * | ||
| 290 | * system_freezeable_wq is equivalent to system_wq except that it's | ||
| 291 | * freezeable. | ||
| 289 | */ | 292 | */ |
| 290 | extern struct workqueue_struct *system_wq; | 293 | extern struct workqueue_struct *system_wq; |
| 291 | extern struct workqueue_struct *system_long_wq; | 294 | extern struct workqueue_struct *system_long_wq; |
| 292 | extern struct workqueue_struct *system_nrt_wq; | 295 | extern struct workqueue_struct *system_nrt_wq; |
| 293 | extern struct workqueue_struct *system_unbound_wq; | 296 | extern struct workqueue_struct *system_unbound_wq; |
| 297 | extern struct workqueue_struct *system_freezeable_wq; | ||
| 294 | 298 | ||
| 295 | extern struct workqueue_struct * | 299 | extern struct workqueue_struct * |
| 296 | __alloc_workqueue_key(const char *name, unsigned int flags, int max_active, | 300 | __alloc_workqueue_key(const char *name, unsigned int flags, int max_active, |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 11869faa681..28f8bd08f0e 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
| @@ -249,10 +249,12 @@ struct workqueue_struct *system_wq __read_mostly; | |||
| 249 | struct workqueue_struct *system_long_wq __read_mostly; | 249 | struct workqueue_struct *system_long_wq __read_mostly; |
| 250 | struct workqueue_struct *system_nrt_wq __read_mostly; | 250 | struct workqueue_struct *system_nrt_wq __read_mostly; |
| 251 | struct workqueue_struct *system_unbound_wq __read_mostly; | 251 | struct workqueue_struct *system_unbound_wq __read_mostly; |
| 252 | struct workqueue_struct *system_freezeable_wq __read_mostly; | ||
| 252 | EXPORT_SYMBOL_GPL(system_wq); | 253 | EXPORT_SYMBOL_GPL(system_wq); |
| 253 | EXPORT_SYMBOL_GPL(system_long_wq); | 254 | EXPORT_SYMBOL_GPL(system_long_wq); |
| 254 | EXPORT_SYMBOL_GPL(system_nrt_wq); | 255 | EXPORT_SYMBOL_GPL(system_nrt_wq); |
| 255 | EXPORT_SYMBOL_GPL(system_unbound_wq); | 256 | EXPORT_SYMBOL_GPL(system_unbound_wq); |
| 257 | EXPORT_SYMBOL_GPL(system_freezeable_wq); | ||
| 256 | 258 | ||
| 257 | #define CREATE_TRACE_POINTS | 259 | #define CREATE_TRACE_POINTS |
| 258 | #include <trace/events/workqueue.h> | 260 | #include <trace/events/workqueue.h> |
| @@ -3764,8 +3766,10 @@ static int __init init_workqueues(void) | |||
| 3764 | system_nrt_wq = alloc_workqueue("events_nrt", WQ_NON_REENTRANT, 0); | 3766 | system_nrt_wq = alloc_workqueue("events_nrt", WQ_NON_REENTRANT, 0); |
| 3765 | system_unbound_wq = alloc_workqueue("events_unbound", WQ_UNBOUND, | 3767 | system_unbound_wq = alloc_workqueue("events_unbound", WQ_UNBOUND, |
| 3766 | WQ_UNBOUND_MAX_ACTIVE); | 3768 | WQ_UNBOUND_MAX_ACTIVE); |
| 3769 | system_freezeable_wq = alloc_workqueue("events_freezeable", | ||
| 3770 | WQ_FREEZEABLE, 0); | ||
| 3767 | BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq || | 3771 | BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq || |
| 3768 | !system_unbound_wq); | 3772 | !system_unbound_wq || !system_freezeable_wq); |
| 3769 | return 0; | 3773 | return 0; |
| 3770 | } | 3774 | } |
| 3771 | early_initcall(init_workqueues); | 3775 | early_initcall(init_workqueues); |
