diff options
author | Matthew Ahrens <[email protected]> | 2018-06-20 14:07:50 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-06-20 14:07:50 -0700 |
commit | af43029484cc368112954668dace8fa9327f72f2 (patch) | |
tree | ef462b5a92579ce6133ae75dae7f7cc90e0f0845 /module/zfs/spa.c | |
parent | e4a3297a044ebafe467e6edda6096a784a0e1848 (diff) |
Remove suffix from zio taskq names
For zio taskq's which have multiple instances (e.g. z_rd_int_0,
z_rd_int_1, etc), each one has a unique name (the _0, _1, _2 suffix).
This makes performance analysis more difficult, because by default,
`perf` includes the thread name (which is the same as the taskq name) in
the stack trace. This means that we get 8 different stacks, all of
which are doing the same thing, but are executed from different taskq's.
We should remove the suffix of the taskq name, so that all the
read-interrupt threads are named z_rd_int.
Note that we already support multiple taskq's with the same name. This
happens when there are multiple pools. In this case the taskq has a
different tq_instance, which shows up in /proc/spl/taskq-all.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed by: Richard Elling <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed by: Pavel Zakharov <[email protected]>
Signed-off-by: Matthew Ahrens <[email protected]>
Closes #7646
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r-- | module/zfs/spa.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 45cb6eb00..cdc03e66c 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -923,7 +923,6 @@ spa_taskqs_init(spa_t *spa, zio_type_t t, zio_taskq_type_t q) uint_t value = ztip->zti_value; uint_t count = ztip->zti_count; spa_taskqs_t *tqs = &spa->spa_zio_taskq[t][q]; - char name[32]; uint_t flags = 0; boolean_t batch = B_FALSE; @@ -960,14 +959,10 @@ spa_taskqs_init(spa_t *spa, zio_type_t t, zio_taskq_type_t q) for (uint_t i = 0; i < count; i++) { taskq_t *tq; + char name[32]; - if (count > 1) { - (void) snprintf(name, sizeof (name), "%s_%s_%u", - zio_type_name[t], zio_taskq_types[q], i); - } else { - (void) snprintf(name, sizeof (name), "%s_%s", - zio_type_name[t], zio_taskq_types[q]); - } + (void) snprintf(name, sizeof (name), "%s_%s", + zio_type_name[t], zio_taskq_types[q]); if (zio_taskq_sysdc && spa->spa_proc != &p0) { if (batch) |