HomeFreeBSD

Improve performance for zpool trim on linux

Description

Improve performance for zpool trim on linux

On Linux, ZFS uses blkdev_issue_discard in vdev_disk_io_trim to issue
trim command which is synchronous.

This commit updates vdev_disk_io_trim to use __blkdev_issue_discard,
which is asynchronous. Unfortunately there isn't any asynchronous
version for blkdev_issue_secure_erase, so performance of secure trim
will still suffer.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #15843

Details

Provenance
Umer Saleem <usaleem@ixsystems.com>Authored on Feb 2 2024, 7:51 PM
GitHub <noreply@github.com>Committed on Feb 2 2024, 7:51 PM
Parents
rG2e6b3c4d9453: Linux 6.8 compat: handle mnt_idmap user_namespace change
Branches
Unknown
Tags
Unknown