Files
mirror_zfs/module/zfs
Rob Norris ee8803adc2 vdev_file: make FLUSH and TRIM asynchronous
zfs_file_fsync() and zfs_file_deallocate() are both blocking ops, so the
zio_taskq thread is active and blocked both while waiting for the IO
call and then while calling zio_execute() for the next stage. This is a
particular issue for FLUSH, as the z_flush_iss queue typically only has
one thread; multiple flushes arriving at once can cause long delays if
the underlying fsync() response is particularly slow.

To fix this, we dispatch both FLUSH and TRIM to the z_vdev_file taskq,
just as we do for reads and writes. Further, we return all results
through zio_interrupt(), so neither the issue nor the file taskqs are
blocked.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17064
2025-02-22 14:16:54 -05:00
..
2024-09-14 13:47:59 -07:00
2022-03-15 15:13:42 -07:00
2023-01-10 13:39:22 -08:00
2024-09-14 13:47:59 -07:00
2024-09-04 14:17:02 -07:00
2024-08-16 12:03:35 -07:00
2024-05-29 10:49:11 -07:00
2024-11-04 16:42:06 -08:00
2023-03-14 15:59:58 -07:00
2023-06-09 10:12:52 -07:00
2022-03-15 15:13:42 -07:00
2022-01-12 16:14:36 -08:00
2024-04-09 16:23:19 -07:00
2019-06-19 09:48:12 -07:00
2022-03-15 15:13:42 -07:00
2024-09-14 13:47:59 -07:00
2023-03-14 15:25:50 -07:00
2022-09-02 13:31:19 -07:00
2024-05-29 10:49:11 -07:00
2024-09-14 13:47:59 -07:00
2022-11-29 09:26:03 -08:00