aboutsummaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 'include')
-rw-r--r--include/sys/sysmacros.h4
-rw-r--r--include/sys/taskq.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h
index 9f16ac70f..4dc7cd858 100644
--- a/include/sys/sysmacros.h
+++ b/include/sys/sysmacros.h
@@ -93,8 +93,8 @@
*
* Treat shim tasks as SCHED_NORMAL tasks
*/
-#define minclsyspri (MAX_RT_PRIO)
-#define maxclsyspri (MAX_PRIO-1)
+#define minclsyspri (MAX_PRIO-1)
+#define maxclsyspri (MAX_RT_PRIO)
#define defclsyspri (DEFAULT_PRIO)
#ifndef NICE_TO_PRIO
diff --git a/include/sys/taskq.h b/include/sys/taskq.h
index 5c29e8f0e..a43a86da6 100644
--- a/include/sys/taskq.h
+++ b/include/sys/taskq.h
@@ -129,7 +129,7 @@ extern int taskq_member(taskq_t *, void *);
#define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \
taskq_create(name, nthreads, pri, min, max, flags)
#define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \
- taskq_create(name, nthreads, defclsyspri, min, max, flags)
+ taskq_create(name, nthreads, maxclsyspri, min, max, flags)
int spl_taskq_init(void);
void spl_taskq_fini(void);