aboutsummaryrefslogtreecommitdiffstats
path: root/module/spl/spl-taskq.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-08-31 17:00:17 -0700
committerBrian Behlendorf <[email protected]>2015-08-31 17:03:01 -0700
commit801b56090b42763d1d3b2593bb8d731d0d8fef22 (patch)
tree2be70be0dcda560ac429b13d040447a3922f68d4 /module/spl/spl-taskq.c
parent076821eaff146a56aa6a66916d70eda7db3347ed (diff)
Revert "Create a new thread during recursive taskq dispatch if necessary"
This reverts commit 076821e due to a locking issue uncovered in subsequent testing. An ASSERT is hit due to tq->tq_nspawn being updated outside the lock. The patch will need to be reworked. VERIFY3(0 == tq->tq_nspawn) failed (0 == -1) Signed-off-by: Brian Behlendorf <[email protected]> Issue #472
Diffstat (limited to 'module/spl/spl-taskq.c')
-rw-r--r--module/spl/spl-taskq.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c
index 2202aced7..7a756af37 100644
--- a/module/spl/spl-taskq.c
+++ b/module/spl/spl-taskq.c
@@ -53,7 +53,6 @@ EXPORT_SYMBOL(system_taskq);
/* Private dedicated taskq for creating new taskq threads on demand. */
static taskq_t *dynamic_taskq;
static taskq_thread_t *taskq_thread_create(taskq_t *);
-static int taskq_thread_spawn(taskq_t *tq, int seq_tasks);
static int
task_km_flags(uint_t flags)
@@ -534,7 +533,6 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags)
{
taskq_ent_t *t;
taskqid_t rc = 0;
- boolean_t threadlimit = B_FALSE;
ASSERT(tq);
ASSERT(func);
@@ -576,13 +574,7 @@ taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags)
wake_up(&tq->tq_work_waitq);
out:
- threadlimit = (tq->tq_nactive == tq->tq_nthreads);
spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags);
-
- /* Spawn additional taskq threads if required. */
- if (threadlimit && taskq_member(tq, current))
- (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1);
-
return (rc);
}
EXPORT_SYMBOL(taskq_dispatch);
@@ -593,7 +585,6 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg,
{
taskqid_t rc = 0;
taskq_ent_t *t;
- boolean_t threadlimit = B_FALSE;
ASSERT(tq);
ASSERT(func);
@@ -626,13 +617,7 @@ taskq_dispatch_delay(taskq_t *tq, task_func_t func, void *arg,
spin_unlock(&t->tqent_lock);
out:
- threadlimit = (tq->tq_nactive == tq->tq_nthreads);
spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags);
-
- /* Spawn additional taskq threads if required. */
- if (threadlimit && taskq_member(tq, current))
- (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1);
-
return (rc);
}
EXPORT_SYMBOL(taskq_dispatch_delay);
@@ -641,8 +626,6 @@ void
taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags,
taskq_ent_t *t)
{
- boolean_t threadlimit = B_FALSE;
-
ASSERT(tq);
ASSERT(func);
@@ -678,12 +661,7 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags,
wake_up(&tq->tq_work_waitq);
out:
- threadlimit = (tq->tq_nactive == tq->tq_nthreads);
spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags);
-
- /* Spawn additional taskq threads if required. */
- if (threadlimit && taskq_member(tq, current))
- (void) taskq_thread_spawn(tq, spl_taskq_thread_sequential + 1);
}
EXPORT_SYMBOL(taskq_dispatch_ent);