HomeFreeBSD

Drop periph (device) locks for da and ada drivers while submitting commands
rS255019Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Drop periph (device) locks for da and ada drivers while submitting commands
for execution. That substantially reduces these locks hold time, removing any
measurable congestion. While GEOM guaranties that disk won't be closed before
all requests completed, dropping lock in this place opens hypothetical race
in case if last request manage to complete before submission call return. If
periph will be destroyed at that point, it may cause user-after-free panic.
To cover that case introduce additional per-periph reference counter to make
close handler wait for all submission threads to get out before dropping
periph reference and return.

This change removes last measurable lock congestion inside CAM core on my
test setup. The only congestion left is inside SIM between request submit
and completion threads, but avoiding that requires SIM modification and
depending on specific hardware may be problematic or impossible.

On my present test setup this increases maximum IOPS from 673K to 724K.

Details

Provenance
mavAuthored on
Parents
rS255018: Remove GNU_PATCH leftover.
Branches
Unknown
Tags
Unknown

Event Timeline