zfs/module/splat
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 Add script for builtin module building. 2012-07-26 15:13:09 -07:00
splat-atomic.c Add MUTEX_FSTRANS mutex type 2015-03-03 10:18:24 -08:00
splat-condvar.c Refactor existing code 2015-01-16 13:55:08 -08:00
splat-cred.c splat cred:groupmember: Fix false positives 2014-04-08 12:44:41 -07:00
splat-ctl.c Retire spl_module_init()/spl_module_fini() 2015-02-27 13:43:39 -08:00
splat-generic.c Remove compat includes from sys/types.h 2014-11-19 10:35:12 -08:00
splat-internal.h Refactor existing code 2015-01-16 13:55:08 -08:00
splat-kmem.c Refine slab cache sizing 2015-01-16 13:55:09 -08:00
splat-kobj.c Refresh links to web site 2013-03-04 19:09:34 -08:00
splat-linux.c Remove compat includes from sys/types.h 2014-11-19 10:35:12 -08:00
splat-list.c Refresh links to web site 2013-03-04 19:09:34 -08:00
splat-mutex.c Remove compat includes from sys/types.h 2014-11-19 10:35:12 -08:00
splat-random.c Refresh links to web site 2013-03-04 19:09:34 -08:00
splat-rwlock.c Remove compat includes from sys/types.h 2014-11-19 10:35:12 -08:00
splat-taskq.c Add TASKQ_DYNAMIC feature 2015-06-24 15:14:18 -07:00
splat-thread.c Remove compat includes from sys/types.h 2014-11-19 10:35:12 -08:00
splat-time.c Remove compat includes from sys/types.h 2014-11-19 10:35:12 -08:00
splat-vnode.c Refresh links to web site 2013-03-04 19:09:34 -08:00
splat-zlib.c Refactor existing code 2015-01-16 13:55:08 -08:00