Skip to content

Commit 30ae2fc

Browse files
committed
workqueue: Minor follow-ups to the rescuer destruction change
* Now that wq->rescuer may be cleared while rescuer is still there, switch show_pwq() debug printout to test worker->rescue_wq to identify rescuers intead of testing wq->rescuer. * Update comment on ->rescuer locking. Signed-off-by: Tejun Heo <tj@kernel.org> Suggested-by: Lai Jiangshan <jiangshanlai@gmail.com>
1 parent 8efe122 commit 30ae2fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kernel/workqueue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ struct workqueue_struct {
248248
struct list_head flusher_overflow; /* WQ: flush overflow list */
249249

250250
struct list_head maydays; /* MD: pwqs requesting rescue */
251-
struct worker *rescuer; /* I: rescue worker */
251+
struct worker *rescuer; /* MD: rescue worker */
252252

253253
int nr_drainers; /* WQ: drain in progress */
254254
int saved_max_active; /* WQ: saved pwq max_active */
@@ -4672,7 +4672,7 @@ static void show_pwq(struct pool_workqueue *pwq)
46724672

46734673
pr_cont("%s %d%s:%ps", comma ? "," : "",
46744674
task_pid_nr(worker->task),
4675-
worker == pwq->wq->rescuer ? "(RESCUER)" : "",
4675+
worker->rescue_wq ? "(RESCUER)" : "",
46764676
worker->current_func);
46774677
list_for_each_entry(work, &worker->scheduled, entry)
46784678
pr_cont_work(false, work);

0 commit comments

Comments
 (0)