Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206242
b: refs/heads/master
c: 9f9c236
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Jul 14, 2010
1 parent 71701b0 commit 9682690
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: 083b804c4d3e1e3d0eace56bdbc0f674946d2847
refs/heads/master: 9f9c23644b07e7a51f6f39064e61c150be712932
8 changes: 3 additions & 5 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,14 +1442,14 @@ static bool maybe_create_worker(struct global_cwq *gcwq)
if (!need_to_create_worker(gcwq))
return false;
restart:
spin_unlock_irq(&gcwq->lock);

/* if we don't make progress in MAYDAY_INITIAL_TIMEOUT, call for help */
mod_timer(&gcwq->mayday_timer, jiffies + MAYDAY_INITIAL_TIMEOUT);

while (true) {
struct worker *worker;

spin_unlock_irq(&gcwq->lock);

worker = create_worker(gcwq, true);
if (worker) {
del_timer_sync(&gcwq->mayday_timer);
Expand All @@ -1462,15 +1462,13 @@ static bool maybe_create_worker(struct global_cwq *gcwq)
if (!need_to_create_worker(gcwq))
break;

spin_unlock_irq(&gcwq->lock);
__set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(CREATE_COOLDOWN);
spin_lock_irq(&gcwq->lock);

if (!need_to_create_worker(gcwq))
break;
}

spin_unlock_irq(&gcwq->lock);
del_timer_sync(&gcwq->mayday_timer);
spin_lock_irq(&gcwq->lock);
if (need_to_create_worker(gcwq))
Expand Down

0 comments on commit 9682690

Please sign in to comment.