]> git.baikalelectronics.ru Git - kernel.git/commit
kthread_work: wake up worker only when the worker is idle
authorLai Jiangshan <laijs@cn.fujitsu.com>
Sat, 26 Jul 2014 04:03:59 +0000 (12:03 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 28 Jul 2014 18:07:52 +0000 (14:07 -0400)
commit54242b5be573e0f4b21586ccc4e6d7dfd5bfe115
treedb9574ae09b6a593d8a3e239f532abf1dcfa7c3a
parent1f98d629230434ac98e5aa17906da4184a7b4622
kthread_work: wake up worker only when the worker is idle

If the worker is already executing a work item when another is queued,
we can safely skip wakeup without worrying about stalling queue thus
avoiding waking up the busy worker spuriously.  Spurious wakeups
should be fine but still isn't nice and avoiding it is trivial here.

tj: Updated description.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/kthread.c