Skip to content

Commit

Permalink
workqueue: factor out worker_pool from global_cwq
Browse files Browse the repository at this point in the history
Move worklist and all worker management fields from global_cwq into
the new struct worker_pool.  worker_pool points back to the containing
gcwq.  worker and cpu_workqueue_struct are updated to point to
worker_pool instead of gcwq too.

This change is mechanical and doesn't introduce any functional
difference other than rearranging of fields and an added level of
indirection in some places.  This is to prepare for multiple pools per
gcwq.

v2: Comment typo fixes as suggested by Namhyung.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
  • Loading branch information
htejun committed Jul 12, 2012
1 parent 974271c commit bd7bdd4
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 100 deletions.
2 changes: 1 addition & 1 deletion include/trace/events/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ TRACE_EVENT(workqueue_queue_work,
__entry->function = work->func;
__entry->workqueue = cwq->wq;
__entry->req_cpu = req_cpu;
__entry->cpu = cwq->gcwq->cpu;
__entry->cpu = cwq->pool->gcwq->cpu;
),

TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u",
Expand Down
Loading

0 comments on commit bd7bdd4

Please sign in to comment.