Illumos #734: Use taskq_dispatch_ent() interface
authorGarrett D'Amore <garrett@nexenta.com>
Tue, 8 Nov 2011 00:26:52 +0000 (16:26 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 14 Dec 2011 17:19:30 +0000 (09:19 -0800)
commita38718a63d79116d6cb614dd2821e2a3955e5c8c
tree05bdaf166ff065cedd2951380d92c65c7545b9cd
parent30a9524e45f76d4c7860bcbf5567aeaa8aeb7a82
Illumos #734: Use taskq_dispatch_ent() interface

It has been observed that some of the hottest locks are those
of the zio taskqs.  Contention on these locks can limit the
rate at which zios are dispatched which limits performance.

This upstream change from Illumos uses new interface to the
taskqs which allow them to utilize a prealloc'ed taskq_ent_t.
This removes the need to perform an allocation at dispatch
time while holding the contended lock.  This has the effect
of improving system performance.

Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Alexey Zaytsev <alexey.zaytsev@nexenta.com>
Reviewed by: Jason Brian King <jason.brian.king@gmail.com>
Reviewed by: George Wilson <gwilson@zfsmail.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>

References to Illumos issue:
  https://www.illumos.org/issues/734

Ported-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #482
include/sys/zfs_context.h
include/sys/zio.h
lib/libzpool/taskq.c
module/zfs/spa.c
module/zfs/zio.c