diff options
author | behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c> | 2008-04-25 22:10:47 +0000 |
---|---|---|
committer | behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c> | 2008-04-25 22:10:47 +0000 |
commit | bcd68186d8009957b751720a801e4c16bb272e83 (patch) | |
tree | b5b0e1055f5bad5308e07c73bbf99892ec9188ed /modules/splat | |
parent | 839d8b438e1d877fb4a625eed51f556433cbd6b6 (diff) |
New an improved taskq implementation for the SPL. It allows a
configurable number of threads like the Solaris version and almost
all of the options are supported. Unfortunately, it appears to have
made absolutely no difference to our performance numbers. I need
to keep looking for where we are bottle necking.
git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@93 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
Diffstat (limited to 'modules/splat')
-rw-r--r-- | modules/splat/splat-taskq.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/modules/splat/splat-taskq.c b/modules/splat/splat-taskq.c index 6effc4cab..b4d07c95d 100644 --- a/modules/splat/splat-taskq.c +++ b/modules/splat/splat-taskq.c @@ -43,7 +43,8 @@ splat_taskq_test1(struct file *file, void *arg) splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' creating\n", SPLAT_TASKQ_TEST1_NAME); - if ((tq = taskq_create(SPLAT_TASKQ_TEST1_NAME, 1, 0, 0, 0, 0)) == NULL) { + if ((tq = taskq_create(SPLAT_TASKQ_TEST1_NAME, 1, maxclsyspri, + 50, INT_MAX, TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' create failed\n", SPLAT_TASKQ_TEST1_NAME); @@ -58,7 +59,8 @@ splat_taskq_test1(struct file *file, void *arg) splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatching\n", tq_arg.name, sym2str(splat_taskq_test1_func)); - if ((id = taskq_dispatch(tq, splat_taskq_test1_func, &tq_arg, 0)) == 0) { + if ((id = taskq_dispatch(tq, splat_taskq_test1_func, + &tq_arg, TQ_SLEEP)) == 0) { splat_vprint(file, SPLAT_TASKQ_TEST1_NAME, "Taskq '%s' function '%s' dispatch failed\n", tq_arg.name, sym2str(splat_taskq_test1_func)); @@ -109,6 +111,8 @@ splat_taskq_test2_func2(void *arg) } #define TEST2_TASKQS 8 +#define TEST2_THREADS_PER_TASKQ 4 + static int splat_taskq_test2(struct file *file, void *arg) { taskq_t *tq[TEST2_TASKQS] = { NULL }; @@ -121,7 +125,9 @@ splat_taskq_test2(struct file *file, void *arg) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' " "creating\n", SPLAT_TASKQ_TEST2_NAME, i); if ((tq[i] = taskq_create(SPLAT_TASKQ_TEST2_NAME, - 1, 0, 0, 0, 0)) == NULL) { + TEST2_THREADS_PER_TASKQ, + maxclsyspri, 50, INT_MAX, + TASKQ_PREPOPULATE)) == NULL) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' create failed\n", SPLAT_TASKQ_TEST2_NAME, i); @@ -139,7 +145,8 @@ splat_taskq_test2(struct file *file, void *arg) { tq_args[i].name, tq_args[i].id, sym2str(splat_taskq_test2_func1)); if ((id = taskq_dispatch( - tq[i], splat_taskq_test2_func1, &tq_args[i], 0)) == 0) { + tq[i], splat_taskq_test2_func1, + &tq_args[i], TQ_SLEEP)) == 0) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatch " "failed\n", tq_args[i].name, tq_args[i].id, @@ -153,7 +160,8 @@ splat_taskq_test2(struct file *file, void *arg) { tq_args[i].name, tq_args[i].id, sym2str(splat_taskq_test2_func2)); if ((id = taskq_dispatch( - tq[i], splat_taskq_test2_func2, &tq_args[i], 0)) == 0) { + tq[i], splat_taskq_test2_func2, + &tq_args[i], TQ_SLEEP)) == 0) { splat_vprint(file, SPLAT_TASKQ_TEST2_NAME, "Taskq '%s/%d' function '%s' dispatch failed\n", tq_args[i].name, tq_args[i].id, |