]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dmu.c
Remove ARC/ZIO physdone callbacks.
authorAlexander Motin <mav@FreeBSD.org>
Thu, 15 Jun 2023 17:49:03 +0000 (13:49 -0400)
committerGitHub <noreply@github.com>
Thu, 15 Jun 2023 17:49:03 +0000 (10:49 -0700)
commitccec7fbe1c66c5b63a3af9d152403ce43344f4ab
treef0199ca2a86dc4638c7563ab26c014241135b1f9
parente32e326c5b3c6ba4a7632abcf86f394233041148
Remove ARC/ZIO physdone callbacks.

Those callbacks were introduced many years ago as part of a bigger
patch to smoothen the write throttling within a txg. They allow to
account completion of individual physical writes within a logical
one, improving cases when some of physical writes complete much
sooner than others, gradually opening the write throttle.

Few years after that ZFS got allocation throttling, working on a
level of logical writes and limiting number of writes queued to
vdevs at any point, and so limiting latency distribution between
the physical writes and especially writes of multiple copies.
The addition of scheduling deadline I proposed in #14925 should
further reduce the latency distribution.  Grown memory sizes over
the past 10 years should also reduce importance of the smoothing.

While the use of physdone callback may still in theory provide
some smoother throttling, there are cases where we simply can not
afford it.  Since dirty data accounting is protected by pool-wide
lock, in case of 6-wide RAIDZ, for example, it requires us to take
it 8 times per logical block write, creating huge lock contention.

My tests of this patch show radical reduction of the lock spinning
time on workloads when smaller blocks are written to RAIDZ pools,
when each of the disks receives 8-16KB chunks, but the total rate
reaching 100K+ blocks per second.  Same time attempts to measure
any write time fluctuations didn't show anything noticeable.

While there, remove also io_child_count/io_parent_count counters.
They are used only for couple assertions that can be avoided.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #14948
include/sys/arc.h
include/sys/arc_impl.h
include/sys/zio.h
module/zfs/arc.c
module/zfs/dbuf.c
module/zfs/dmu.c
module/zfs/dmu_objset.c
module/zfs/zio.c