mirror_zfs/module
Ricardo M. Correia 26f7245c7c Fix taskq code to not drop tasks when TQ_SLEEP is used.
When TQ_SLEEP is used, taskq_dispatch() should always succeed even if the
number of pending tasks is above tq->tq_maxalloc. This semantic is similar
to KM_SLEEP in kmem allocations, which also always succeed.

However, we cannot block forever otherwise there is a risk of deadlock.
Therefore, we still allow the number of pending tasks to go above
tq->tq_maxalloc with TQ_SLEEP, but we may sleep up to 1 second per task
dispatch, thereby throttling the task dispatch rate.

One of the existing splat tests was also augmented to test for this scenario.
The test would fail with the previous implementation but now it succeeds.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-08-02 11:20:31 -07:00
..
spl Fix taskq code to not drop tasks when TQ_SLEEP is used. 2010-08-02 11:20:31 -07:00
splat Fix taskq code to not drop tasks when TQ_SLEEP is used. 2010-08-02 11:20:31 -07:00
.gitignore sun-misc-gitignore 2010-01-08 09:37:54 -08:00
Makefile.in Add uninstall Makefile targets 2010-07-28 14:55:32 -07:00