diff options
author | mav <mav@FreeBSD.org> | 2014-06-17 08:09:40 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-06-17 08:09:40 +0000 |
commit | 7b99979e56176d928b7d97a29875a26f25f74936 (patch) | |
tree | e1809f48d7900eca83a21e2eb54b7c7969093258 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c | |
parent | d418fd00cccabf30d672bf6253a9a501cec23629 (diff) | |
download | FreeBSD-src-7b99979e56176d928b7d97a29875a26f25f74936.zip FreeBSD-src-7b99979e56176d928b7d97a29875a26f25f74936.tar.gz |
MFC r267029, r267038:
Replace gethrtime() with cpu_ticks(), as source of random for the taskqueue
selection. gethrtime() in our port updated with HZ rate, so unusable for
this specific purpose, completely draining benefit of multiple taskqueues.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c index 6ab48ca..adee7b6 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c @@ -953,7 +953,11 @@ spa_taskq_dispatch_ent(spa_t *spa, zio_type_t t, zio_taskq_type_t q, if (tqs->stqs_count == 1) { tq = tqs->stqs_taskq[0]; } else { +#ifdef _KERNEL + tq = tqs->stqs_taskq[cpu_ticks() % tqs->stqs_count]; +#else tq = tqs->stqs_taskq[gethrtime() % tqs->stqs_count]; +#endif } taskq_dispatch_ent(tq, func, arg, flags, ent); |