diff options
author | Tejun Heo <tj@kernel.org> | 2010-06-29 10:07:12 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-06-29 10:07:12 +0200 |
commit | c8e55f360210c1bc49bea5d62bc3939b7ee13483 (patch) | |
tree | c2e88d5576e5f65c036ba60c52f9518901f2a2f0 /include | |
parent | 8b03ae3cde59af9facab7c831b4141515d5dbcc8 (diff) |
workqueue: implement worker states
Implement worker states. After created, a worker is STARTED. While a
worker isn't processing a work, it's IDLE and chained on
gcwq->idle_list. While processing a work, a worker is BUSY and
chained on gcwq->busy_hash. Also, gcwq now counts the number of all
workers and idle ones.
worker_thread() is restructured to reflect state transitions.
cwq->more_work is removed and waking up a worker makes it check for
events. A worker is killed by setting DIE flag while it's IDLE and
waking it up.
This gives gcwq better visibility of what's going on and allows it to
find out whether a work is executing quickly which is necessary to
have multiple workers processing the same cwq.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions