mirror_zfs/module/spl
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
..
.gitignore sun-misc-gitignore 2010-01-08 09:37:54 -08:00
Makefile.in Add basic credential support and splat tests. 2009-07-27 17:18:59 -07:00
spl-atomic.c Public Release Prep 2010-05-17 15:18:00 -07:00
spl-condvar.c Prefix all SPL debug macros with 'S' 2010-07-20 13:30:40 -07:00
spl-cred.c Public Release Prep 2010-05-17 15:18:00 -07:00
spl-debug.c Remove deadcode caused by removal of format1 arg 2010-07-21 16:31:42 -07:00
spl-err.c Prefix all SPL debug macros with 'S' 2010-07-20 13:30:40 -07:00
spl-generic.c Display DEBUG keyword during module load when --enable-debug is used. 2010-07-20 15:31:03 -07:00
spl-kmem.c Strfree() should call kfree() not kmem_free() 2010-07-30 22:20:58 -07:00
spl-kobj.c Prefix all SPL debug macros with 'S' 2010-07-20 13:30:40 -07:00
spl-kstat.c Prefix all SPL debug macros with 'S' 2010-07-20 13:30:40 -07:00
spl-module.c Prefix all SPL debug macros with 'S' 2010-07-20 13:30:40 -07:00
spl-mutex.c Public Release Prep 2010-05-17 15:18:00 -07:00
spl-proc.c Prefix all SPL debug macros with 'S' 2010-07-20 13:30:40 -07:00
spl-rwlock.c Public Release Prep 2010-05-17 15:18:00 -07:00
spl-taskq.c Fix taskq code to not drop tasks when TQ_SLEEP is used. 2010-08-02 11:20:31 -07:00
spl-thread.c Prefix all SPL debug macros with 'S' 2010-07-20 13:30:40 -07:00
spl-time.c Minor 32-bit fix cast to hrtime_t before the mutliply. 2010-05-23 09:51:17 -07:00
spl-vnode.c Fix two minor compiler warnings 2010-07-26 10:24:26 -07:00
spl-xdr.c Prefix all SPL debug macros with 'S' 2010-07-20 13:30:40 -07:00