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 Oct 25 2024, 6:28 AM
Tony Hutter <hutter2@llnl.gov>Committed on Nov 6 2024, 6:07 PM
Parents
rG4197af4df146: Updating bash completion build file
Branches
Unknown
Tags
Unknown