Skip to content
Snippets Groups Projects
Commit 5beb27df authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

solaris: implement the TASKQ_THREADS_CPU_PCT taskq flag

Now that we have a reliable number of CPUs indicator the implementation
is trivial.
parent b49f066c
No related branches found
No related tags found
No related merge requests found
...@@ -64,10 +64,8 @@ taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused2, ...@@ -64,10 +64,8 @@ taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused2,
{ {
taskq_t *tq; taskq_t *tq;
if ((flags & TASKQ_THREADS_CPU_PCT) != 0) { if ((flags & TASKQ_THREADS_CPU_PCT) != 0)
kprintf("using unsupported TASKQ_THREADS_CPU_PCT flag\n"); nthreads = MAX((mp_ncpus * nthreads) / 100, 1);
// nthreads = MAX((mp_ncpus * nthreads) / 100, 1);
}
tq = kmem_alloc(sizeof(*tq), KM_SLEEP); tq = kmem_alloc(sizeof(*tq), KM_SLEEP);
tq->tq_queue = taskqueue_create(name, M_WAITOK, taskqueue_thread_enqueue, tq->tq_queue = taskqueue_create(name, M_WAITOK, taskqueue_thread_enqueue,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment