mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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
This commit is contained in:
+2
-3
@@ -304,9 +304,8 @@ int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
|
||||
zio_t *arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
|
||||
arc_buf_t *buf, boolean_t uncached, boolean_t l2arc, const zio_prop_t *zp,
|
||||
arc_write_done_func_t *ready, arc_write_done_func_t *child_ready,
|
||||
arc_write_done_func_t *physdone, arc_write_done_func_t *done,
|
||||
void *priv, zio_priority_t priority, int zio_flags,
|
||||
const zbookmark_phys_t *zb);
|
||||
arc_write_done_func_t *done, void *priv, zio_priority_t priority,
|
||||
int zio_flags, const zbookmark_phys_t *zb);
|
||||
|
||||
arc_prune_t *arc_add_prune_callback(arc_prune_func_t *func, void *priv);
|
||||
void arc_remove_prune_callback(arc_prune_t *p);
|
||||
|
||||
@@ -123,7 +123,6 @@ struct arc_write_callback {
|
||||
void *awcb_private;
|
||||
arc_write_done_func_t *awcb_ready;
|
||||
arc_write_done_func_t *awcb_children_ready;
|
||||
arc_write_done_func_t *awcb_physdone;
|
||||
arc_write_done_func_t *awcb_done;
|
||||
arc_buf_t *awcb_buf;
|
||||
};
|
||||
|
||||
+2
-7
@@ -460,7 +460,6 @@ struct zio {
|
||||
/* Callback info */
|
||||
zio_done_func_t *io_ready;
|
||||
zio_done_func_t *io_children_ready;
|
||||
zio_done_func_t *io_physdone;
|
||||
zio_done_func_t *io_done;
|
||||
void *io_private;
|
||||
int64_t io_prev_space_delta; /* DMU private */
|
||||
@@ -503,9 +502,6 @@ struct zio {
|
||||
int io_error;
|
||||
int io_child_error[ZIO_CHILD_TYPES];
|
||||
uint64_t io_children[ZIO_CHILD_TYPES][ZIO_WAIT_TYPES];
|
||||
uint64_t io_child_count;
|
||||
uint64_t io_phys_children;
|
||||
uint64_t io_parent_count;
|
||||
uint64_t *io_stall;
|
||||
zio_t *io_gang_leader;
|
||||
zio_gang_node_t *io_gang_tree;
|
||||
@@ -553,9 +549,8 @@ extern zio_t *zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
|
||||
extern zio_t *zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
|
||||
struct abd *data, uint64_t size, uint64_t psize, const zio_prop_t *zp,
|
||||
zio_done_func_t *ready, zio_done_func_t *children_ready,
|
||||
zio_done_func_t *physdone, zio_done_func_t *done,
|
||||
void *priv, zio_priority_t priority, zio_flag_t flags,
|
||||
const zbookmark_phys_t *zb);
|
||||
zio_done_func_t *done, void *priv, zio_priority_t priority,
|
||||
zio_flag_t flags, const zbookmark_phys_t *zb);
|
||||
|
||||
extern zio_t *zio_rewrite(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
|
||||
struct abd *data, uint64_t size, zio_done_func_t *done, void *priv,
|
||||
|
||||
Reference in New Issue
Block a user