HomeFreeBSD

Remove lock from dsl_pool_need_dirty_delay()

Description

Remove lock from dsl_pool_need_dirty_delay()

Torn reads/writes of dp_dirty_total are unlikely: on 64-bit systems
due to register size, while on 32-bit due to memory constraints.
And even if we hit some race, the code implementing the delay takes
the lock any way.

Removal of the poll-wide lock acquisition saves ~1% of CPU time on
8-thread 8KB write workload.

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

Details

Provenance
mavAuthored on Oct 20 2023, 7:37 PM
Tony Hutter <hutter2@llnl.gov>Committed on Nov 7 2023, 12:46 AM
Parents
rG0ef1964c79fd: run-zts test procfs/pool_state failed with uncorrectable I/O failure
Branches
Unknown
Tags
Unknown