History

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.

Tejun Heo committed 7 years ago

Commit 30ae2fc1 parent 8efe1221 file · +2 −2Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+2−2
@@ -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);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t