Bug #12511
closedvioblk should preallocate virtio chains
100%
Description
In vioblk_alloc_reqs()
, vioblk
makes an effort to preallocate a set of buffers for I/O requests. Unfortunately, in vioblk_common_start()
we call the virtio_chain_alloc()
routine to allocate memory for the descriptor chain we need to submit these requests into the virtqueue; this routine does dynamic allocations that can fail. We should follow the pattern established in vioif
, and allocate the chains when we're initially populating the vib_reqs
free list, using virtio_chain_clear()
to reset them upon return to the free list.
Updated by Patrick Mooney almost 2 years ago
I have a build VM (running OmniOSce 151034) which has been hit by this recently. An illumos-gate build will place the machine under memory pressure, at which point DMA allocations for swap IO fails and the machine locks up hard.
Updated by Patrick Mooney almost 2 years ago
- Status changed from New to In Progress
- Assignee set to Patrick Mooney
Updated by Patrick Mooney almost 2 years ago
I have a test VM using a virtio-block device to back its root (and only) zpool. I booted it up with this change and incurred some various IO:
- cloning a git repo
- scrubbing the pool
- trimming the pool (with the newly landed #12506)
All of these seemed to work without issue. I also NMIed the machine to make sure dump works, which it did. After it came back up, I savecore
-ed the crash dump to make sure it looked OK.
Updated by Electric Monk almost 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit 3decf16814408c6b0b69d8df1e56e01cd3313a4f
commit 3decf16814408c6b0b69d8df1e56e01cd3313a4f Author: Patrick Mooney <pmooney@pfmooney.com> Date: 2020-07-10T18:09:44.000Z 12511 vioblk should preallocate virtio chains Reviewed by: Jason King <jason.king@joyent.com> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Andy Fiddaman <andy@omniosce.org> Approved by: Joshua M. Clulow <josh@sysmgr.org>