Skip to content

Commit ee1ceef

Browse files
committed
workqueue: Rename wq->cpu_pwqs to wq->cpu_pwq
wq->cpu_pwqs is a percpu variable carraying one pointer to a pool_workqueue. The field name being plural is unusual and confusing. Rename it to singular. This patch doesn't cause any functional changes. Signed-off-by: Tejun Heo <[email protected]>
1 parent fe089f8 commit ee1ceef

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

kernel/workqueue.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ struct workqueue_struct {
321321

322322
/* hot fields used during command issue, aligned to cacheline */
323323
unsigned int flags ____cacheline_aligned; /* WQ: WQ_* flags */
324-
struct pool_workqueue __percpu *cpu_pwqs; /* I: per-cpu pwqs */
324+
struct pool_workqueue __percpu *cpu_pwq; /* I: per-cpu pwqs */
325325
struct pool_workqueue __rcu *numa_pwq_tbl[]; /* PWR: unbound pwqs indexed by node */
326326
};
327327

@@ -1635,7 +1635,7 @@ static void __queue_work(int cpu, struct workqueue_struct *wq,
16351635
} else {
16361636
if (req_cpu == WORK_CPU_UNBOUND)
16371637
cpu = raw_smp_processor_id();
1638-
pwq = per_cpu_ptr(wq->cpu_pwqs, cpu);
1638+
pwq = per_cpu_ptr(wq->cpu_pwq, cpu);
16391639
}
16401640

16411641
pool = pwq->pool;
@@ -3826,7 +3826,7 @@ static void rcu_free_wq(struct rcu_head *rcu)
38263826
wq_free_lockdep(wq);
38273827

38283828
if (!(wq->flags & WQ_UNBOUND))
3829-
free_percpu(wq->cpu_pwqs);
3829+
free_percpu(wq->cpu_pwq);
38303830
else
38313831
free_workqueue_attrs(wq->unbound_attrs);
38323832

@@ -4518,13 +4518,13 @@ static int alloc_and_link_pwqs(struct workqueue_struct *wq)
45184518
int cpu, ret;
45194519

45204520
if (!(wq->flags & WQ_UNBOUND)) {
4521-
wq->cpu_pwqs = alloc_percpu(struct pool_workqueue);
4522-
if (!wq->cpu_pwqs)
4521+
wq->cpu_pwq = alloc_percpu(struct pool_workqueue);
4522+
if (!wq->cpu_pwq)
45234523
return -ENOMEM;
45244524

45254525
for_each_possible_cpu(cpu) {
45264526
struct pool_workqueue *pwq =
4527-
per_cpu_ptr(wq->cpu_pwqs, cpu);
4527+
per_cpu_ptr(wq->cpu_pwq, cpu);
45284528
struct worker_pool *cpu_pools =
45294529
per_cpu(cpu_worker_pools, cpu);
45304530

@@ -4905,7 +4905,7 @@ bool workqueue_congested(int cpu, struct workqueue_struct *wq)
49054905
cpu = smp_processor_id();
49064906

49074907
if (!(wq->flags & WQ_UNBOUND))
4908-
pwq = per_cpu_ptr(wq->cpu_pwqs, cpu);
4908+
pwq = per_cpu_ptr(wq->cpu_pwq, cpu);
49094909
else
49104910
pwq = unbound_pwq_by_node(wq, cpu_to_node(cpu));
49114911

0 commit comments

Comments
 (0)