Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
torvalds committed Dec 15, 2010
2 parents 6d5e93c + 2d64672 commit 0fcdcfb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6583,6 +6583,15 @@ F: include/linux/mfd/wm8400*
F: include/sound/wm????.h
F: sound/soc/codecs/wm*

WORKQUEUE
M: Tejun Heo <[email protected]>
L: [email protected]
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git
S: Maintained
F: include/linux/workqueue.h
F: kernel/workqueue.c
F: Documentation/workqueue.txt

X.25 NETWORK LAYER
M: Andrew Hendry <[email protected]>
L: [email protected]
Expand Down
7 changes: 4 additions & 3 deletions kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ void wq_worker_waking_up(struct task_struct *task, unsigned int cpu)
{
struct worker *worker = kthread_data(task);

if (likely(!(worker->flags & WORKER_NOT_RUNNING)))
if (!(worker->flags & WORKER_NOT_RUNNING))
atomic_inc(get_gcwq_nr_running(cpu));
}

Expand All @@ -687,7 +687,7 @@ struct task_struct *wq_worker_sleeping(struct task_struct *task,
struct global_cwq *gcwq = get_gcwq(cpu);
atomic_t *nr_running = get_gcwq_nr_running(cpu);

if (unlikely(worker->flags & WORKER_NOT_RUNNING))
if (worker->flags & WORKER_NOT_RUNNING)
return NULL;

/* this can only happen on the local cpu */
Expand Down Expand Up @@ -3692,7 +3692,8 @@ static int __init init_workqueues(void)
system_nrt_wq = alloc_workqueue("events_nrt", WQ_NON_REENTRANT, 0);
system_unbound_wq = alloc_workqueue("events_unbound", WQ_UNBOUND,
WQ_UNBOUND_MAX_ACTIVE);
BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq);
BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq ||
!system_unbound_wq);
return 0;
}
early_initcall(init_workqueues);

0 comments on commit 0fcdcfb

Please sign in to comment.