]> git.proxmox.com Git - mirror_zfs.git/commit
zfs_ioc_send: use a dedicated taskq thread for send
authorRob Norris <rob.norris@klarasystems.com>
Thu, 2 May 2024 01:57:23 +0000 (11:57 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 14 May 2024 16:39:26 +0000 (09:39 -0700)
commitcc38691534310ba22ddc80fedbc10a7ac55237fd
tree6b66c865a1835a532a91b3496839691d9d459f27
parentb64afa41d56e98b5817aaf14c7deb0fa7e2142fb
zfs_ioc_send: use a dedicated taskq thread for send

When stack space is tight, the stream is written to its target on a
separate taskq thread to make sure there's enough stack space to
complete it.

This has always used an IO taskq, but that doesn't really make sense for
it, and moving it onto a regular taskq lets us get rid of
spa_taskq_dispatch_sync(), which is not used anywhere else.

Stream writes may block for a long time depending on what the target is,
and we have no way of discovering this, so we can't risk using the
system taskq, as there may be many tens of sends in progress. Instead,
we create a dedicated taskq thread for each send writer to run on, and
clean it up when it's done.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16151
module/zfs/zfs_ioctl.c