mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
workqueue: rename cpu_workqueue to pool_workqueue
workqueue has moved away from global_cwqs to worker_pools and with the scheduled custom worker pools, wforkqueues will be associated with pools which don't have anything to do with CPUs. The workqueue code went through significant amount of changes recently and mass renaming isn't likely to hurt much additionally. Let's replace 'cpu' with 'pool' so that it reflects the current design. * s/struct cpu_workqueue_struct/struct pool_workqueue/ * s/cpu_wq/pool_wq/ * s/cwq/pwq/ This patch is purely cosmetic. Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
8d03ecfe47
commit
112202d909
|
@ -27,7 +27,7 @@ void delayed_work_timer_fn(unsigned long __data);
|
|||
enum {
|
||||
WORK_STRUCT_PENDING_BIT = 0, /* work item is pending execution */
|
||||
WORK_STRUCT_DELAYED_BIT = 1, /* work item is delayed */
|
||||
WORK_STRUCT_CWQ_BIT = 2, /* data points to cwq */
|
||||
WORK_STRUCT_PWQ_BIT = 2, /* data points to pwq */
|
||||
WORK_STRUCT_LINKED_BIT = 3, /* next work is linked to this one */
|
||||
#ifdef CONFIG_DEBUG_OBJECTS_WORK
|
||||
WORK_STRUCT_STATIC_BIT = 4, /* static initializer (debugobjects) */
|
||||
|
@ -40,7 +40,7 @@ enum {
|
|||
|
||||
WORK_STRUCT_PENDING = 1 << WORK_STRUCT_PENDING_BIT,
|
||||
WORK_STRUCT_DELAYED = 1 << WORK_STRUCT_DELAYED_BIT,
|
||||
WORK_STRUCT_CWQ = 1 << WORK_STRUCT_CWQ_BIT,
|
||||
WORK_STRUCT_PWQ = 1 << WORK_STRUCT_PWQ_BIT,
|
||||
WORK_STRUCT_LINKED = 1 << WORK_STRUCT_LINKED_BIT,
|
||||
#ifdef CONFIG_DEBUG_OBJECTS_WORK
|
||||
WORK_STRUCT_STATIC = 1 << WORK_STRUCT_STATIC_BIT,
|
||||
|
@ -60,14 +60,14 @@ enum {
|
|||
WORK_CPU_END = NR_CPUS + 1,
|
||||
|
||||
/*
|
||||
* Reserve 7 bits off of cwq pointer w/ debugobjects turned
|
||||
* off. This makes cwqs aligned to 256 bytes and allows 15
|
||||
* workqueue flush colors.
|
||||
* Reserve 7 bits off of pwq pointer w/ debugobjects turned off.
|
||||
* This makes pwqs aligned to 256 bytes and allows 15 workqueue
|
||||
* flush colors.
|
||||
*/
|
||||
WORK_STRUCT_FLAG_BITS = WORK_STRUCT_COLOR_SHIFT +
|
||||
WORK_STRUCT_COLOR_BITS,
|
||||
|
||||
/* data contains off-queue information when !WORK_STRUCT_CWQ */
|
||||
/* data contains off-queue information when !WORK_STRUCT_PWQ */
|
||||
WORK_OFFQ_FLAG_BASE = WORK_STRUCT_FLAG_BITS,
|
||||
|
||||
WORK_OFFQ_CANCELING = (1 << WORK_OFFQ_FLAG_BASE),
|
||||
|
|
|
@ -27,7 +27,7 @@ DECLARE_EVENT_CLASS(workqueue_work,
|
|||
/**
|
||||
* workqueue_queue_work - called when a work gets queued
|
||||
* @req_cpu: the requested cpu
|
||||
* @cwq: pointer to struct cpu_workqueue_struct
|
||||
* @pwq: pointer to struct pool_workqueue
|
||||
* @work: pointer to struct work_struct
|
||||
*
|
||||
* This event occurs when a work is queued immediately or once a
|
||||
|
@ -36,10 +36,10 @@ DECLARE_EVENT_CLASS(workqueue_work,
|
|||
*/
|
||||
TRACE_EVENT(workqueue_queue_work,
|
||||
|
||||
TP_PROTO(unsigned int req_cpu, struct cpu_workqueue_struct *cwq,
|
||||
TP_PROTO(unsigned int req_cpu, struct pool_workqueue *pwq,
|
||||
struct work_struct *work),
|
||||
|
||||
TP_ARGS(req_cpu, cwq, work),
|
||||
TP_ARGS(req_cpu, pwq, work),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( void *, work )
|
||||
|
@ -52,9 +52,9 @@ TRACE_EVENT(workqueue_queue_work,
|
|||
TP_fast_assign(
|
||||
__entry->work = work;
|
||||
__entry->function = work->func;
|
||||
__entry->workqueue = cwq->wq;
|
||||
__entry->workqueue = pwq->wq;
|
||||
__entry->req_cpu = req_cpu;
|
||||
__entry->cpu = cwq->pool->cpu;
|
||||
__entry->cpu = pwq->pool->cpu;
|
||||
),
|
||||
|
||||
TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u",
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -28,7 +28,7 @@ struct worker {
|
|||
|
||||
struct work_struct *current_work; /* L: work being processed */
|
||||
work_func_t current_func; /* L: current_work's fn */
|
||||
struct cpu_workqueue_struct *current_cwq; /* L: current_work's cwq */
|
||||
struct pool_workqueue *current_pwq; /* L: current_work's pwq */
|
||||
struct list_head scheduled; /* L: scheduled works */
|
||||
struct task_struct *task; /* I: worker task */
|
||||
struct worker_pool *pool; /* I: the associated pool */
|
||||
|
|
Loading…
Reference in a new issue