diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-14 21:50:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-14 21:50:10 -0500 |
commit | 0fcdcfbbc98f70f559e4b36773a69972489a6d8f (patch) | |
tree | 108d532e9c79b76c6adaf8b564749a19ffbbce66 | |
parent | 6d5e93c2aa1248b25f9de0eaca1dca038e31d79d (diff) | |
parent | 2d64672ed38721b7a3815009d79bfb90a1f34a17 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: It is likely that WORKER_NOT_RUNNING is true
MAINTAINERS: Add workqueue entry
workqueue: check the allocation of system_unbound_wq
-rw-r--r-- | MAINTAINERS | 9 | ||||
-rw-r--r-- | kernel/workqueue.c | 7 |
2 files changed, 13 insertions, 3 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 9b952c5495bb..0b0d2ba69a8e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -6583,6 +6583,15 @@ F: include/linux/mfd/wm8400* | |||
6583 | F: include/sound/wm????.h | 6583 | F: include/sound/wm????.h |
6584 | F: sound/soc/codecs/wm* | 6584 | F: sound/soc/codecs/wm* |
6585 | 6585 | ||
6586 | WORKQUEUE | ||
6587 | M: Tejun Heo <tj@kernel.org> | ||
6588 | L: linux-kernel@vger.kernel.org | ||
6589 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git | ||
6590 | S: Maintained | ||
6591 | F: include/linux/workqueue.h | ||
6592 | F: kernel/workqueue.c | ||
6593 | F: Documentation/workqueue.txt | ||
6594 | |||
6586 | X.25 NETWORK LAYER | 6595 | X.25 NETWORK LAYER |
6587 | M: Andrew Hendry <andrew.hendry@gmail.com> | 6596 | M: Andrew Hendry <andrew.hendry@gmail.com> |
6588 | L: linux-x25@vger.kernel.org | 6597 | L: linux-x25@vger.kernel.org |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 90db1bd1a978..e785b0f2aea5 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -661,7 +661,7 @@ void wq_worker_waking_up(struct task_struct *task, unsigned int cpu) | |||
661 | { | 661 | { |
662 | struct worker *worker = kthread_data(task); | 662 | struct worker *worker = kthread_data(task); |
663 | 663 | ||
664 | if (likely(!(worker->flags & WORKER_NOT_RUNNING))) | 664 | if (!(worker->flags & WORKER_NOT_RUNNING)) |
665 | atomic_inc(get_gcwq_nr_running(cpu)); | 665 | atomic_inc(get_gcwq_nr_running(cpu)); |
666 | } | 666 | } |
667 | 667 | ||
@@ -687,7 +687,7 @@ struct task_struct *wq_worker_sleeping(struct task_struct *task, | |||
687 | struct global_cwq *gcwq = get_gcwq(cpu); | 687 | struct global_cwq *gcwq = get_gcwq(cpu); |
688 | atomic_t *nr_running = get_gcwq_nr_running(cpu); | 688 | atomic_t *nr_running = get_gcwq_nr_running(cpu); |
689 | 689 | ||
690 | if (unlikely(worker->flags & WORKER_NOT_RUNNING)) | 690 | if (worker->flags & WORKER_NOT_RUNNING) |
691 | return NULL; | 691 | return NULL; |
692 | 692 | ||
693 | /* this can only happen on the local cpu */ | 693 | /* this can only happen on the local cpu */ |
@@ -3692,7 +3692,8 @@ static int __init init_workqueues(void) | |||
3692 | system_nrt_wq = alloc_workqueue("events_nrt", WQ_NON_REENTRANT, 0); | 3692 | system_nrt_wq = alloc_workqueue("events_nrt", WQ_NON_REENTRANT, 0); |
3693 | system_unbound_wq = alloc_workqueue("events_unbound", WQ_UNBOUND, | 3693 | system_unbound_wq = alloc_workqueue("events_unbound", WQ_UNBOUND, |
3694 | WQ_UNBOUND_MAX_ACTIVE); | 3694 | WQ_UNBOUND_MAX_ACTIVE); |
3695 | BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq); | 3695 | BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq || |
3696 | !system_unbound_wq); | ||
3696 | return 0; | 3697 | return 0; |
3697 | } | 3698 | } |
3698 | early_initcall(init_workqueues); | 3699 | early_initcall(init_workqueues); |