HomeFreeBSD

ZAP: Massively switch to _by_dnode() interfaces

Description

ZAP: Massively switch to _by_dnode() interfaces

Before this change ZAP called dnode_hold() for almost every block
access, that was clearly visible in profiler under heavy load, such
as BRT. This patch makes it always hold the dnode reference between
zap_lockdir() and zap_unlockdir(). It allows to avoid most of dnode
operations between those. It also adds several new _by_dnode() APIs
to ZAP and uses them in BRT code. Also adds dmu_prefetch_by_dnode()
variant and uses it in the ZAP code.

After this there remains only one call to dmu_buf_dnode_enter(),
which seems to be unneeded. So remove the call and the functions.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15951

Details

Provenance
mavAuthored on Mar 25 2024, 9:58 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Apr 19 2024, 5:13 PM
Parents
rGfdd8c0aea1cf: BRT: Skip duplicate BRT prefetches
Branches
Unknown
Tags
Unknown