Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322611
b: refs/heads/master
c: 90beca5
h: refs/heads/master
i:
  322609: e7ea59a
  322607: 692b37a
v: v3
  • Loading branch information
Tejun Heo committed Sep 5, 2012
1 parent 503d883 commit 58fd476
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 96e65306b81351b656835c15931d1d237b252f27
refs/heads/master: 90beca5de591e12482a812f23a7f10690962ed4a
26 changes: 13 additions & 13 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,19 +1422,7 @@ static void rebind_workers(struct global_cwq *gcwq)
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) {
struct work_struct *rebind_work = &worker->rebind_work;
unsigned long worker_flags = worker->flags;
Expand All @@ -1454,6 +1442,18 @@ static void rebind_workers(struct global_cwq *gcwq)
worker->scheduled.next,
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)
Expand Down

0 comments on commit 58fd476

Please sign in to comment.