]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: fix mayday_mask handling on UP
authorTejun Heo <tj@kernel.org>
Tue, 20 Jul 2010 13:59:09 +0000 (15:59 +0200)
committerTejun Heo <tj@kernel.org>
Tue, 20 Jul 2010 13:59:09 +0000 (15:59 +0200)
commit0b92dfa214f7b2e9cba13cac7e2b3ac44755095d
tree13929e2e6010d10ec84dfd43e2cd063002daecca
parentbae331d5336a4d8e60a20921061d9ec4294e038c
workqueue: fix mayday_mask handling on UP

All cpumasks are assumed to have cpu 0 permanently set on UP, so it
can't be used to signify whether there's something to be done for the
CPU.  workqueue was using cpumask to track which CPU requested rescuer
assistance and this led rescuer thread to think there always are
pending mayday requests on UP, which resulted in infinite busy loops.

This patch fixes the problem by introducing mayday_mask_t and
associated helpers which wrap cpumask on SMP and emulates its behavior
using bitops and unsigned long on UP.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
kernel/workqueue.c