]> git.proxmox.com Git - mirror_spl-debian.git/commit
Revert "Taskq locking optimizations"
authorNed Bass <bass6@llnl.gov>
Thu, 19 Jan 2012 19:36:27 +0000 (11:36 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 19 Jan 2012 22:42:39 +0000 (14:42 -0800)
commit0bb43ca2823ab55a74565f6e17e2c36749cff3b9
tree30f8159127d5a846f412081cdf66e6393676be7e
parent87d112392415df7604888cf343df4e48a3404513
Revert "Taskq locking optimizations"

This reverts commit ec2b41049f7f576aaa772b326d083e5971212d33.

A race condition was introduced by which a wake_up() call can be lost
after the taskq thread determines there is no pending work items,
leading to deadlock:

1. taksq thread enables interrupts
2. dispatcher thread runs, queues work item, call wake_up()
3. taskq thread runs, adds self to waitq, sleeps

This could easily happen if an interrupt for an IO completion was
outstanding at the point where the taskq thread reenables interrupts,
just before the call to add_wait_queue_exclusive().  The handler would
run immediately within the race window.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #32
module/spl/spl-taskq.c