Skip to content

Commit 26fb7e3

Browse files
Waiman-Longhtejun
authored andcommitted
workqueue: Link pwq's into wq->pwqs from oldest to newest
Add a new pwq into the tail of wq->pwqs so that pwq iteration will start from the oldest pwq to the newest. This ordering will facilitate the inclusion of ordered workqueues in a wq_unbound_cpumask update. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent 40911d4 commit 26fb7e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/workqueue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4804,7 +4804,7 @@ static void link_pwq(struct pool_workqueue *pwq)
48044804
pwq->work_color = wq->work_color;
48054805

48064806
/* link in @pwq */
4807-
list_add_rcu(&pwq->pwqs_node, &wq->pwqs);
4807+
list_add_tail_rcu(&pwq->pwqs_node, &wq->pwqs);
48084808
}
48094809

48104810
/* obtain a pool matching @attr and create a pwq associating the pool and @wq */

0 commit comments

Comments
 (0)