Use the new nvme_allocate_request_buf after we vmapbuf the user data for
passthrough ioctls.
Sponsored by: Netflix
Differential D52111
nvme: On ioctl, use nvme_allocate_request_buf imp on Aug 22 2025, 1:15 AM. Authored by Tags None Referenced Files
Subscribers
Details
Diff Detail
Event TimelineComment Actions Btw, I do find it odd that the driver uses vmapbuf. Other code tends to instead use vm_fault_quick_hold_pages (or whatever it is called now) (see for example the AIO code) and then uses the vm_pages array from that directly. That avoids creating temporary kernel mappings with the associated cost of TLB shutdowns, etc. Comment Actions As discussed elsewhere, the next review will fix this by always unmapping. We'll eliminate the buf dance after the branch since we just need an array of pages, which in theory could live here on the stack... For. my use case, though, I'll likely just have two pages on the stack in the wrappers that will go around this... Comment Actions (pick a random one I had opened): https://reviews.freebsd.org/D52149 has an update to this and other parts of this stack. We ditch the buf usage entirely, so all but related things aren't needed. |