HomeFreeBSD

Trust ARC_BUF_SHARED() more

Description

Trust ARC_BUF_SHARED() more

In my understanding ARC_BUF_SHARED() and arc_buf_is_shared() should
return identical results, except the second also asserts it deeper.
The first is much cheaper though, saving few pointer dereferences.
Replace production arc_buf_is_shared() calls with ARC_BUF_SHARED(),
and call arc_buf_is_shared() in random assertions, while making it
even more strict.

On my tests this in half reduces arc_buf_destroy_impl() time, that
noticeably reduces hash_lock congestion under heavy dbuf eviction.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Wilson <george.wilson@delphix.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15397

Details

Provenance
mavAuthored on Oct 20 2023, 7:38 PM
Tony Hutter <hutter2@llnl.gov>Committed on Nov 7 2023, 12:47 AM
Parents
rG79f7de575252: Remove lock from dsl_pool_need_dirty_delay()
Branches
Unknown
Tags
Unknown