HomeFreeBSD

vdev_disk: move abd return and free off the interrupt handler

Description

vdev_disk: move abd return and free off the interrupt handler

Freeing an ABD can take sleeping locks to update various stats. We
aren't allowed to sleep on an interrupt handler. So, move the free off
to the io_done callback.

We should never have been freeing things in the interrupt handler, but
we got away with it because we were usually freeing a linear ABD, which
at most is returning two objects to a cache and never sleeping. Scatter
ABDs can be used now, and those have more complex locking.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16687

Details

Provenance
rob.norris_klarasystems.comAuthored on Fri, Oct 25, 6:28 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Fri, Nov 1, 12:00 AM
Parents
rG63bafe60ec74: vdev_disk: try harder to ensure IO alignment rules
Branches
Unknown
Tags
Unknown