mirror_zfs/module/spl
Brian Behlendorf f7a973d99b Add TASKQ_DYNAMIC feature
Setting the TASKQ_DYNAMIC flag will create a taskq with dynamic
semantics.  Initially only a single worker thread will be created
to service tasks dispatched to the queue.  As additional threads
are needed they will be dynamically spawned up to the max number
specified by 'nthreads'.  When the threads are no longer needed,
because the taskq is empty, they will automatically terminate.

Due to the low cost of creating and destroying threads under Linux
by default new threads and spawned and terminated aggressively.
There are two modules options which can be tuned to adjust this
behavior if needed.

* spl_taskq_thread_sequential - The number of sequential tasks,
without interruption, which needed to be handled by a worker
thread before a new worker thread is spawned.  Default 4.

* spl_taskq_thread_dynamic - Provides the ability to completely
disable the use of dynamic taskqs on the system.  This is provided
for the purposes of debugging and troubleshooting.  Default 1
(enabled).

This behavior is fundamentally consistent with the dynamic taskq
implementation found in both illumos and FreeBSD.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Closes #458
2015-06-24 15:14:18 -07:00
..
Makefile.in Refactor existing code 2015-01-16 13:55:08 -08:00
spl-atomic.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-condvar.c Rename cv_wait_interruptible() to cv_wait_sig() 2015-06-10 16:36:12 -07:00
spl-cred.c Remove credential configure checks. 2014-10-17 15:11:51 -07:00
spl-err.c Retire legacy debugging infrastructure 2014-11-19 10:35:07 -08:00
spl-generic.c Retire spl_module_init()/spl_module_fini() 2015-02-27 13:43:39 -08:00
spl-kmem-cache.c Don't allow shrinking a PF_FSTRANS context 2015-04-03 11:32:31 -07:00
spl-kmem.c Optimize vmem_alloc() retry path 2015-02-02 10:57:56 -08:00
spl-kobj.c Fix GFP_KERNEL allocations flags 2015-01-21 15:25:19 -08:00
spl-kstat.c Refactor existing code 2015-01-16 13:55:08 -08:00
spl-mutex.c Remove adaptive mutex implementation 2014-10-17 15:07:28 -07:00
spl-proc.c Refactor generic memory allocation interfaces 2015-01-16 13:55:09 -08:00
spl-rwlock.c Refresh links to web site 2013-03-04 19:09:34 -08:00
spl-taskq.c Add TASKQ_DYNAMIC feature 2015-06-24 15:14:18 -07:00
spl-thread.c Retire legacy debugging infrastructure 2014-11-19 10:35:07 -08:00
spl-tsd.c Fix cstyle issues in spl-tsd.c 2015-04-24 14:23:07 -07:00
spl-vmem.c Add hooks for disabling direct reclaim 2015-01-16 13:55:09 -08:00
spl-vnode.c Implement areleasef() 2015-04-24 13:02:37 -07:00
spl-xdr.c Retire legacy debugging infrastructure 2014-11-19 10:35:07 -08:00
spl-zlib.c Refactor existing code 2015-01-16 13:55:08 -08:00