* 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.
Showing the changes to kernel/workqueue.c (1 of 1 file). Show all
Unified · Split
| @@ -248,7 +248,7 @@ struct workqueue_struct { · 247 unmodified lines | |||
| 248 | struct list_head flusher_overflow; /* WQ: flush overflow list */ | 248 | struct list_head flusher_overflow; /* WQ: flush overflow list */ |
| 249 | 249 | ||
| 250 | struct list_head maydays; /* MD: pwqs requesting rescue */ | 250 | struct list_head maydays; /* MD: pwqs requesting rescue */ |
| 251 | struct worker *rescuer; /* I: rescue worker */ | 251 | struct worker *rescuer; /* MD: rescue worker */ |
| 252 | 252 | ||
| 253 | int nr_drainers; /* WQ: drain in progress */ | 253 | int nr_drainers; /* WQ: drain in progress */ |
| 254 | int saved_max_active; /* WQ: saved pwq max_active */ | 254 | int saved_max_active; /* WQ: saved pwq max_active */ |
| @@ -4672,7 +4672,7 @@ static void show_pwq(struct pool_workqueue *pwq) · 4417 unmodified lines | |||
| 4672 | 4672 | ||
| 4673 | pr_cont("%s %d%s:%ps", comma ? "," : "", | 4673 | pr_cont("%s %d%s:%ps", comma ? "," : "", |
| 4674 | task_pid_nr(worker->task), | 4674 | task_pid_nr(worker->task), |
| 4675 | worker == pwq->wq->rescuer ? "(RESCUER)" : "", | 4675 | worker->rescue_wq ? "(RESCUER)" : "", |
| 4676 | worker->current_func); | 4676 | worker->current_func); |
| 4677 | list_for_each_entry(work, &worker->scheduled, entry) | 4677 | list_for_each_entry(work, &worker->scheduled, entry) |
| 4678 | pr_cont_work(false, work); | 4678 | pr_cont_work(false, work); |