The 2080 round 9ce951f521-1115-0907 failed
reserved_queues::a_device_with_no_queue_to_spare_reports_the_reserved_queue_absent:
"11 asked, 11 reserved; no message", where queue_plan(families, u32::MAX)
spares 10 (NVIDIA's graphics family of 16 less the round robin's floor of
four and presenting's two). Asked for 11, the plan takes 4 + 2 + 10 plus the
staging and fill queues, 18 VkQueues; the driver refused that for want of
channels (um790's kernel log: "kchannelAllocMem_GM107: Could not create
Channel" 19 times at 10:01 and 13 at 10:02, while the 780 s run that ended
10:04:38 was at the test), and made_within_resources took least_queue_plan:
queue_plan_within(families, options.reserved_queues, {1, 0}), a round robin
of one and reserved min(15, 11) = 11. 11 is what only that path gives.
So a device short of resources gave the caller more reserved queues than the
same device given them, and skipped the reserved-queues-absent message,
though the least plan's notice and the runtime README say it keeps the
plan's reserved queues. least_queue_plan now reserves as many as the
device's own plan (within options.queue_limits) reserves; its round robin
of one always leaves room for them, so no fewer either.
Tests:
- queue_limits::the_least_plan_reserves_what_the_plan_reserves: every
family shape, reservation (0 to u32::MAX), limit and cached flag; fails
without the fix on NVIDIA's shape asked for 11 (11 against 10) and on a
family of 24.
- reserved_queues::a_device_made_with_its_least_plan_reserves_what_its_plan_spares:
the plan refused through refuse_next_devices(1), the device asked for
spare + 1 takes its least plan (its notice heard, round robin 1) and
reserves spare, reporting the rest absent; refused where the least plan
takes no fewer (lavapipe, RADV).
- The test sink records each message's id name with its text, so the
least plan's notice is matched by its code.
Docs: the degrade catalogue (docs/API.md), LeastQueuePlan's rustdoc and the
runtime README's "A driver short of resources" say the reserved count is the
plan's.
Also: queue_share_device's pinned test takes a stay the sharing rule
explains, as its siblings do (test only).
Verified (msi, m3-max-33039): clippy plain 0; lavapipe reserved_queues,
least_queue_plan, queue_limits and the pinned test 16/16. The 2080 run
follows on development.