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

solaris: allow code using TASKQ_THREADS_CPU_PCT to build

parent 7794d411
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@
#include <sys/cdefs.h>
#include <bsd/porting/netport.h>
#include <osv/debug.h>
#include <sys/param.h>
#include <sys/kmem.h>
......@@ -63,10 +64,10 @@ taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused2,
{
taskq_t *tq;
#ifdef notsupported
if ((flags & TASKQ_THREADS_CPU_PCT) != 0)
nthreads = MAX((mp_ncpus * nthreads) / 100, 1);
#endif
if ((flags & TASKQ_THREADS_CPU_PCT) != 0) {
kprintf("using unsupported TASKQ_THREADS_CPU_PCT flag\n");
// nthreads = MAX((mp_ncpus * nthreads) / 100, 1);
}
tq = kmem_alloc(sizeof(*tq), KM_SLEEP);
tq->tq_queue = taskqueue_create(name, M_WAITOK, taskqueue_thread_enqueue,
......
......@@ -53,9 +53,7 @@ struct proc;
#define TASKQ_PREPOPULATE 0x0001 /* Prepopulate with threads and data */
#define TASKQ_CPR_SAFE 0x0002 /* Use CPR safe protocol */
#define TASKQ_DYNAMIC 0x0004 /* Use dynamic thread scheduling */
#ifdef notsupported
#define TASKQ_THREADS_CPU_PCT 0x0008 /* number of threads as % of ncpu */
#endif
#define TASKQ_DC_BATCH 0x0010 /* Taskq uses SDC in batch mode */
/*
......
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