|
@@ -1422,19 +1422,7 @@ retry:
|
|
goto retry;
|
|
goto retry;
|
|
}
|
|
}
|
|
|
|
|
|
- /*
|
|
|
|
- * All idle workers are rebound and waiting for %WORKER_REBIND to
|
|
|
|
- * be cleared inside idle_worker_rebind(). Clear and release.
|
|
|
|
- * Clearing %WORKER_REBIND from this foreign context is safe
|
|
|
|
- * because these workers are still guaranteed to be idle.
|
|
|
|
- */
|
|
|
|
- for_each_worker_pool(pool, gcwq)
|
|
|
|
- list_for_each_entry(worker, &pool->idle_list, entry)
|
|
|
|
- worker->flags &= ~WORKER_REBIND;
|
|
|
|
-
|
|
|
|
- wake_up_all(&gcwq->rebind_hold);
|
|
|
|
-
|
|
|
|
- /* rebind busy workers */
|
|
|
|
|
|
+ /* all idle workers are rebound, rebind busy workers */
|
|
for_each_busy_worker(worker, i, pos, gcwq) {
|
|
for_each_busy_worker(worker, i, pos, gcwq) {
|
|
struct work_struct *rebind_work = &worker->rebind_work;
|
|
struct work_struct *rebind_work = &worker->rebind_work;
|
|
unsigned long worker_flags = worker->flags;
|
|
unsigned long worker_flags = worker->flags;
|
|
@@ -1454,6 +1442,18 @@ retry:
|
|
worker->scheduled.next,
|
|
worker->scheduled.next,
|
|
work_color_to_flags(WORK_NO_COLOR));
|
|
work_color_to_flags(WORK_NO_COLOR));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * All idle workers are rebound and waiting for %WORKER_REBIND to
|
|
|
|
+ * be cleared inside idle_worker_rebind(). Clear and release.
|
|
|
|
+ * Clearing %WORKER_REBIND from this foreign context is safe
|
|
|
|
+ * because these workers are still guaranteed to be idle.
|
|
|
|
+ */
|
|
|
|
+ for_each_worker_pool(pool, gcwq)
|
|
|
|
+ list_for_each_entry(worker, &pool->idle_list, entry)
|
|
|
|
+ worker->flags &= ~WORKER_REBIND;
|
|
|
|
+
|
|
|
|
+ wake_up_all(&gcwq->rebind_hold);
|
|
}
|
|
}
|
|
|
|
|
|
static struct worker *alloc_worker(void)
|
|
static struct worker *alloc_worker(void)
|