diff options
author | Brian Behlendorf <[email protected]> | 2015-07-23 11:21:08 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-07-23 13:25:49 -0700 |
commit | 62aa81a5776c0bc35f05f8923ea3e293527b5264 (patch) | |
tree | 106eee836ad350cbe2e5c0919af68a6ba3360870 /module/splat/splat-mutex.c | |
parent | 9eb361aaa537724c9a90ab6a9f33521bfd80bad9 (diff) |
Add defclsyspri macro
Add a new defclsyspri macro which can be used to request the default
Linux scheduler priority. Neither the minclsyspri or maxclsyspri map
to the default Linux kernel thread priority. This makes it awkward to
create taskqs which run with the same priority as the rest of the kernel
threads on the system which can lead to performance issues.
All SPL callers which previously used minclsyspri or maxclsyspri have
been changed to use defclsyspri. The vast majority of callers were
part of the test suite which won't have an external impact. The few
places where it could impact performance the change was from maxclsyspri
to defclsyspri. This makes it more likely the process will be scheduled
which may help performance.
To facilitate further performance analysis the spl_taskq_thread_priority
module option has been added. When disabled (0) all newly created kernel
threads will use the default kernel thread priority. When enabled (1)
the specified taskq priority will be used. By default this value is
enabled (1).
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/splat/splat-mutex.c')
-rw-r--r-- | module/splat/splat-mutex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/splat/splat-mutex.c b/module/splat/splat-mutex.c index 909d730cb..86bef8ee3 100644 --- a/module/splat/splat-mutex.c +++ b/module/splat/splat-mutex.c @@ -87,7 +87,7 @@ splat_mutex_test1(struct file *file, void *arg) if (mp == NULL) return -ENOMEM; - tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, 1, maxclsyspri, + tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, 1, defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); if (tq == NULL) { rc = -ENOMEM; @@ -196,7 +196,7 @@ splat_mutex_test2(struct file *file, void *arg) /* Create several threads allowing tasks to race with each other */ tq = taskq_create(SPLAT_MUTEX_TEST_TASKQ, num_online_cpus(), - maxclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); + defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE); if (tq == NULL) { rc = -ENOMEM; goto out; @@ -266,7 +266,7 @@ splat_mutex_test3(struct file *file, void *arg) mp.mp_file = file; mutex_init(&mp.mp_mtx, SPLAT_MUTEX_TEST_NAME, MUTEX_DEFAULT, NULL); - if ((tq = taskq_create(SPLAT_MUTEX_TEST_NAME, 1, maxclsyspri, + if ((tq = taskq_create(SPLAT_MUTEX_TEST_NAME, 1, defclsyspri, 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_MUTEX_TEST3_NAME, "Taskq '%s' " "create failed\n", SPLAT_MUTEX_TEST3_NAME); |