1. 04 Mar, 2013 1 commit
    • Lai Jiangshan's avatar
      workqueue: better define synchronization rule around rescuer->pool updates · b3104104
      Lai Jiangshan authored
      Rescuers visit different worker_pools to process work items from pools
      under pressure.  Currently, rescuer->pool is updated outside any
      locking and when an outsider looks at a rescuer, there's no way to
      tell when and whether rescuer->pool is gonna change.  While this
      doesn't currently cause any problem, it is nasty.
      With recent worker_maybe_bind_and_lock() changes, we can move
      rescuer->pool updates inside pool locks such that if rescuer->pool
      equals a locked pool, it's guaranteed to stay that way until the pool
      is unlocked.
      Move rescuer->pool inside pool->lock.
      This patch doesn't introduce any visible behavior difference.
      tj: Updated the description.
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
  2. 14 Feb, 2013 1 commit
    • Tejun Heo's avatar
      workqueue: rename cpu_workqueue to pool_workqueue · 112202d9
      Tejun Heo authored
      workqueue has moved away from global_cwqs to worker_pools and with the
      scheduled custom worker pools, wforkqueues will be associated with
      pools which don't have anything to do with CPUs.  The workqueue code
      went through significant amount of changes recently and mass renaming
      isn't likely to hurt much additionally.  Let's replace 'cpu' with
      'pool' so that it reflects the current design.
      * s/struct cpu_workqueue_struct/struct pool_workqueue/
      * s/cpu_wq/pool_wq/
      * s/cwq/pwq/
      This patch is purely cosmetic.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
  3. 24 Jan, 2013 1 commit
    • Tejun Heo's avatar
      workqueue: remove global_cwq · a60dc39c
      Tejun Heo authored
      global_cwq is now nothing but a container for per-cpu standard
      worker_pools.  Declare the worker pools directly as
      cpu/unbound_std_worker_pools[] and remove global_cwq.
      * ____cacheline_aligned_in_smp moved from global_cwq to worker_pool.
        This probably would have made sense even before this change as we
        want each pool to be aligned.
      * get_gcwq() is replaced with std_worker_pools() which returns the
        pointer to the standard pool array for a given CPU.
      * __alloc_workqueue_key() updated to use get_std_worker_pool() instead
        of open-coding pool determination.
      This is part of an effort to remove global_cwq and make worker_pool
      the top level abstraction, which in turn will help implementing worker
      pools with user-specified attributes.
      v2: Joonsoo pointed out that it'd better to align struct worker_pool
          rather than the array so that every pool is aligned.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reviewed-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Joonsoo Kim <js1304@gmail.com>
  4. 18 Jan, 2013 3 commits