Skip to content

Commit

Permalink
workqueue: Link pwq's into wq->pwqs from oldest to newest
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Waiman Long authored and Tejun Heo committed Feb 8, 2024
1 parent 40911d4 commit 26fb7e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -4804,7 +4804,7 @@ static void link_pwq(struct pool_workqueue *pwq)
pwq->work_color = wq->work_color;

/* link in @pwq */
list_add_rcu(&pwq->pwqs_node, &wq->pwqs);
list_add_tail_rcu(&pwq->pwqs_node, &wq->pwqs);
}

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

0 comments on commit 26fb7e3

Please sign in to comment.