summaryrefslogtreecommitdiffstats
path: root/include/sys/vmsystm.h
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-03-15 15:13:49 -0700
committerBrian Behlendorf <[email protected]>2009-03-15 15:13:49 -0700
commit7257ec41856cf54d47a85f786f06e5a3c330acfc (patch)
treedffd1f1c2f6472db2621603d1fd6eddb7104b7eb /include/sys/vmsystm.h
parent5b5f5685033b60cbd698c68b11d67150426587f5 (diff)
Fix taskq_wait() not waiting bug
I'm very surprised this has not surfaced until now. But the taskq_wait() implementation work only wait successfully the first time it was called. Subsequent usage of taskq_wait() on the taskq would not wait. The issue was caused by tq->tq_lowest_id being set to MAX_INT after the first wait completed. This caused subsequent waits which check that the waiting id is less than the lowest taskq id to always succeed. The fix is to ensure that tq->tq_lowest_id is never set larger than tq->tq_next.id. Additional fixes which were added to this patch include: 1) Fix a race by placing the taskq_wait_check() in the tq->tq_lock spinlock. 2) taskq_wait() should wait for the largest outstanding id. 3) Multiple spelling corrections. 4) Added taskq wait regression test to validate correct behavior.
Diffstat (limited to 'include/sys/vmsystm.h')
0 files changed, 0 insertions, 0 deletions