###Summary
The struct worker
is the really scheudle unit in workqueue.
Each struct worker
has a corresponding thread(task) by worker->task
.
A struct worker
is linked to struct worker_pool->idle_list
when work is idle.
and moved to struct worker_pool->busy_hash
.
worker_thread
- move
worker
frompool->idle_list
and clearworker
‘sWORKER_IDLE
flag. - check the
pool
and manage the workers(create/destory)
and run them in sequence withIterate all the `struct work_struct *work` in the `struct worker_pool->worklist`,
process_one_work(worker, work);
.- move
worker
into idle list again. - schedule();
1 | 2270 /** |
process_one_work
1 | 2114 /** |