diff options
author | Brian Behlendorf <[email protected]> | 2012-09-12 10:06:13 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-09-12 10:07:48 -0700 |
commit | 330fe010e42fcdbc70832583f95248b9227ac2c4 (patch) | |
tree | 7de29eb59a4c9de81d717f19ae0a1c9f5366476d /module/spl/spl-taskq.c | |
parent | dd87332f478b2a55c007aae568dd242fb2a34602 (diff) |
Revert "Switch KM_SLEEP to KM_PUSHPAGE"
This reverts commit cd5ca4b2f86a606aa6ed68341a3672fdde1c9856
due to conflicts in the higher TQ_ bits which caused incorrect
behavior.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/spl/spl-taskq.c')
-rw-r--r-- | module/spl/spl-taskq.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index b58eb8e94..e4092b842 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -50,6 +50,8 @@ task_alloc(taskq_t *tq, uint_t flags) SENTRY; ASSERT(tq); + ASSERT(flags & (TQ_SLEEP | TQ_NOSLEEP)); /* One set */ + ASSERT(!((flags & TQ_SLEEP) && (flags & TQ_NOSLEEP))); /* Not both */ ASSERT(spin_is_locked(&tq->tq_lock)); retry: /* Acquire taskq_ent_t's from free list if available */ @@ -552,7 +554,7 @@ __taskq_create(const char *name, int nthreads, pri_t pri, nthreads = MAX((num_online_cpus() * nthreads) / 100, 1); } - tq = kmem_alloc(sizeof(*tq), KM_PUSHPAGE); + tq = kmem_alloc(sizeof(*tq), KM_SLEEP); if (tq == NULL) SRETURN(NULL); @@ -578,12 +580,12 @@ __taskq_create(const char *name, int nthreads, pri_t pri, if (flags & TASKQ_PREPOPULATE) for (i = 0; i < minalloc; i++) - task_done(tq, task_alloc(tq, TQ_PUSHPAGE | TQ_NEW)); + task_done(tq, task_alloc(tq, TQ_SLEEP | TQ_NEW)); spin_unlock_irqrestore(&tq->tq_lock, tq->tq_lock_flags); for (i = 0; i < nthreads; i++) { - tqt = kmem_alloc(sizeof(*tqt), KM_PUSHPAGE); + tqt = kmem_alloc(sizeof(*tqt), KM_SLEEP); INIT_LIST_HEAD(&tqt->tqt_thread_list); INIT_LIST_HEAD(&tqt->tqt_active_list); tqt->tqt_tq = tq; |