HomeFreeBSD

Improve zfs_blkptr_verify()

Description

Improve zfs_blkptr_verify()

  • Skip config lock enter/exit for embedded blocks. They have no

DVAs, so there is nothing to check under the lock.

  • Skip CHECKSUM check and properly check PSIZE for embedded blocks.
  • Add static branch predictions for unlikely conditions.
  • Do not verify DVAs for blocks already in ARC. ARC hit already

"verified" the first (often the only) DVA, and it does not worth to
enter/exit config lock for nothing.

Some profiles show me up to 3% of CPU saving from this change.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Allan Jude <allan@klarasystems.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16387

Details

Provenance
mavAuthored on Aug 8 2024, 10:25 PM
GitHub <noreply@github.com>Committed on Aug 8 2024, 10:25 PM
Parents
rG24e6585e761d: libzfs.h: Set ZFS_MAXPROPLEN and ZPOOL_MAXPROPLEN to ZAP_MAXVALUELEN
Branches
Unknown
Tags
Unknown