]> granicus.if.org Git - zfs/commit
Avoid extra taskq_dispatch() calls by DMU
authorAlexander Motin <mav@FreeBSD.org>
Tue, 25 Jun 2019 19:03:38 +0000 (15:03 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 25 Jun 2019 19:03:38 +0000 (12:03 -0700)
commitfc7546777ba15a7fff651cd803bf521f592d8379
tree8c4b293b0def171817efca85346cb55e22209f5d
parent5279ae918befc707b3b2c5e9b97e2b6e8d033d99
Avoid extra taskq_dispatch() calls by DMU

DMU sync code calls taskq_dispatch() for each sublist of os_dirty_dnodes
and os_synced_dnodes.  Since the number of sublists by default is equal
to number of CPUs, it will dispatch equal, potentially large, number of
tasks, waking up many CPUs to handle them, even if only one or few of
sublists actually have any work to do.

This change adds check for empty sublists to avoid this.

Reviewed by: Sean Eric Fagan <sef@ixsystems.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Closes #8909
include/sys/multilist.h
module/zfs/dmu_objset.c
module/zfs/multilist.c