]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'for-3.10' into for-next
authorTejun Heo <tj@kernel.org>
Mon, 18 Mar 2013 19:52:44 +0000 (12:52 -0700)
committerTejun Heo <tj@kernel.org>
Mon, 18 Mar 2013 19:52:44 +0000 (12:52 -0700)
Conflicts:
kernel/workqueue.c

1  2 
kernel/workqueue.c

index 2ebd18218134c3ad91bab6692329c9160ca1c465,969be0b720712190968947d7368e6df74c851fb5..833a1526174a60a6eb89ab7920175909420dec81
@@@ -4193,35 -4136,29 +4136,35 @@@ static void wq_unbind_fn(struct work_st
                pool->flags |= POOL_DISASSOCIATED;
  
                spin_unlock_irq(&pool->lock);
-               mutex_unlock(&pool->assoc_mutex);
+               mutex_unlock(&pool->manager_mutex);
 -      }
  
 -      /*
 -       * Call schedule() so that we cross rq->lock and thus can guarantee
 -       * sched callbacks see the %WORKER_UNBOUND flag.  This is necessary
 -       * as scheduler callbacks may be invoked from other cpus.
 -       */
 -      schedule();
 +              /*
 +               * Call schedule() so that we cross rq->lock and thus can
 +               * guarantee sched callbacks see the %WORKER_UNBOUND flag.
 +               * This is necessary as scheduler callbacks may be invoked
 +               * from other cpus.
 +               */
 +              schedule();
  
 -      /*
 -       * Sched callbacks are disabled now.  Zap nr_running.  After this,
 -       * nr_running stays zero and need_more_worker() and keep_working()
 -       * are always true as long as the worklist is not empty.  Pools on
 -       * @cpu now behave as unbound (in terms of concurrency management)
 -       * pools which are served by workers tied to the CPU.
 -       *
 -       * On return from this function, the current worker would trigger
 -       * unbound chain execution of pending work items if other workers
 -       * didn't already.
 -       */
 -      for_each_cpu_worker_pool(pool, cpu)
 +              /*
 +               * Sched callbacks are disabled now.  Zap nr_running.
 +               * After this, nr_running stays zero and need_more_worker()
 +               * and keep_working() are always true as long as the
 +               * worklist is not empty.  This pool now behaves as an
 +               * unbound (in terms of concurrency management) pool which
 +               * are served by workers tied to the pool.
 +               */
                atomic_set(&pool->nr_running, 0);
 +
 +              /*
 +               * With concurrency management just turned off, a busy
 +               * worker blocking could lead to lengthy stalls.  Kick off
 +               * unbound chain execution of currently pending work items.
 +               */
 +              spin_lock_irq(&pool->lock);
 +              wake_up_worker(pool);
 +              spin_unlock_irq(&pool->lock);
 +      }
  }
  
  /*