HomeFreeBSD

MFC r342558: Switch from mutexes to atomics in GEOM_DEV I/O path.

Description

MFC r342558: Switch from mutexes to atomics in GEOM_DEV I/O path.

Mutexes in I/O path there were used twice per I/O to atomically access
several variables to close and/or destroy the device on last request
completion. I found the way to fit all required info into one integer,
suitable for atomic operations. It opened race window on device close,
but addition of timeout to the msleep() there should cover it.

Profiling shows removal of significant spinning time on those mutexes
and IOPS increase from ~600K to >800K to NVMe on 72-core systems.

Details

Provenance
mavAuthored on
Parents
rS343333: MFC r342558: Switch from mutexes to atomics in GEOM_DEV I/O path.
Branches
Unknown
Tags
Unknown