]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commit
workqueue: unify local CPU queueing handling
authorTejun Heo <tj@kernel.org>
Fri, 3 Aug 2012 17:30:45 +0000 (10:30 -0700)
committerTejun Heo <tj@kernel.org>
Fri, 3 Aug 2012 17:30:45 +0000 (10:30 -0700)
commit57469821fd5c61f25f783827d7334063cff67d65
treee77ead09d823125bc4dc9a9cd49864f9340ad363
parentd8e794dfd51c368ed3f686b7f4172830b60ae47b
workqueue: unify local CPU queueing handling

Queueing functions have been using different methods to determine the
local CPU.

* queue_work() superflously uses get/put_cpu() to acquire and hold the
  local CPU across queue_work_on().

* delayed_work_timer_fn() uses smp_processor_id().

* queue_delayed_work() calls queue_delayed_work_on() with -1 @cpu
  which is interpreted as the local CPU.

* flush_delayed_work[_sync]() were using raw_smp_processor_id().

* __queue_work() interprets %WORK_CPU_UNBOUND as local CPU if the
  target workqueue is bound one but nobody uses this.

This patch converts all functions to uniformly use %WORK_CPU_UNBOUND
to indicate local CPU and use the local binding feature of
__queue_work().  unlikely() is dropped from %WORK_CPU_UNBOUND handling
in __queue_work().

Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c