summaryrefslogtreecommitdiffstats
path: root/module/spl/spl-taskq.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-07-24 10:32:55 -0700
committerBrian Behlendorf <[email protected]>2015-07-28 13:59:03 -0700
commit9dc5ffbec845ec9c4d9b109c85569345c0c11766 (patch)
treed8d22b47a7b4845eb327850264da18807a5cc8df /module/spl/spl-taskq.c
parent4699d76d19f1ff4a59c16c10b2aedab6f5054a73 (diff)
Invert minclsyspri and maxclsyspri
On Linux the meaning of a processes priority is inverted with respect to illumos. High values on Linux indicate a _low_ priority while high value on illumos indicate a _high_ priority. In order to preserve the logical meaning of the minclsyspri and maxclsyspri macros when they are used by the illumos wrapper functions their values have been inverted. This way when changes are merged from upstream illumos we won't need to remember to invert the macro. It could also lead to confusion. Note this change also reverts some of the priorities changes in prior commit 62aa81a. The rational is as follows: spl_kmem_cache - High priority may result in blocked memory allocs spl_system_taskq - May perform I/O for file backed VDEVs spl_dynamic_taskq - New taskq threads should be spawned promptly Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Ned Bass <[email protected]> Issue zfsonlinux/zfs#3607
Diffstat (limited to 'module/spl/spl-taskq.c')
-rw-r--r--module/spl/spl-taskq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c
index b4282333e..7a756af37 100644
--- a/module/spl/spl-taskq.c
+++ b/module/spl/spl-taskq.c
@@ -935,7 +935,6 @@ taskq_create(const char *name, int nthreads, pri_t pri,
int count = 0, rc = 0, i;
ASSERT(name != NULL);
- ASSERT(pri <= maxclsyspri);
ASSERT(minalloc >= 0);
ASSERT(maxalloc <= INT_MAX);
ASSERT(!(flags & (TASKQ_CPR_SAFE))); /* Unsupported */
@@ -1077,12 +1076,12 @@ int
spl_taskq_init(void)
{
system_taskq = taskq_create("spl_system_taskq", MAX(boot_ncpus, 64),
- defclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE|TASKQ_DYNAMIC);
+ maxclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE|TASKQ_DYNAMIC);
if (system_taskq == NULL)
return (1);
dynamic_taskq = taskq_create("spl_dynamic_taskq", 1,
- defclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE);
+ maxclsyspri, boot_ncpus, INT_MAX, TASKQ_PREPOPULATE);
if (dynamic_taskq == NULL) {
taskq_destroy(system_taskq);
return (1);