summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-06-29 10:07:12 +0200
committerTejun Heo <tj@kernel.org>2010-06-29 10:07:12 +0200
commitc8e55f360210c1bc49bea5d62bc3939b7ee13483 (patch)
treec2e88d5576e5f65c036ba60c52f9518901f2a2f0 /include
parent8b03ae3cde59af9facab7c831b4141515d5dbcc8 (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