Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verlässliche Systemsoftware
projects
osv
Commits
c23a9917
Commit
c23a9917
authored
11 years ago
by
Christoph Hellwig
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bsd/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c
+5
-4
5 additions, 4 deletions
bsd/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c
bsd/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h
+0
-2
0 additions, 2 deletions
bsd/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h
with
5 additions
and
6 deletions
bsd/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c
+
5
−
4
View file @
c23a9917
...
...
@@ -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
;
#
if
def 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
,
...
...
This diff is collapsed.
Click to expand it.
bsd/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h
+
0
−
2
View file @
c23a9917
...
...
@@ -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 */
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment