NVIDIA's 615.71.09 (RTX 5080 Laptop) refuses an import of a small udmabuf
dedicated to nothing (ERROR_OUT_OF_DEVICE_MEMORY: one 4 KiB page refused,
64 KiB taken, measured by a probe) and takes the same page dedicated to its
buffer. Two device tests failed there: a guest RAM's use asked the driver
with its first page, the refusal was remembered for the device's life, and
every chunk was then copied; a no-copy buffer's 16 KiB window was copied.
- memory.rs: import_dma_buf takes what the memory backs (DmaBufFor): an
image (dedicated to it), shared memory (dedicated to nothing), or one
buffer alone for its life, tried dedicated to nothing in every type and,
where the driver refuses each, dedicated to the buffer in every type.
That is Vulkan's documented form for one buffer's memory; no driver name
or size rule decides it.
- dma_buf.rs: chunks_buffer/import_chunks pass the buffer where the caller
binds nothing else in the import and the buffer is not sparse: a no-copy
buffer's own import (never a heap's), its residency re-import, a copy's
list of a RAM's runs, and the page a RAM's use asks the driver with. A
RAM's chunk or run is never dedicated: its objects' buffers bind in it.
- A RAM's dma-buf refusal is remembered only where it lasts
(not_importable: the driver refuses the dma-buf itself, or no type takes
it); memory that ran out is that import's alone.
- WorkCounts::dma_buf_buffer_imports_dedicated counts the dedicated retries.
- Tests: two stand-in driven device tests (a no-copy page refused
undedicated takes a dedicated import; a RAM's page is asked dedicated and
the RAM listed while chunk refusals for want of memory are not
remembered); the three remembered-refusal tests use the lasting
ERROR_INVALID_EXTERNAL_HANDLE; the two NVIDIA-failing tests print the
dedicated count.
- Docs: FAST-PATHS's NVIDIA dma-buf gap, HOWTO, the counters' docs.
Verification: in the following jobs (3090, 5080, PHOENIX, clippy x3).