RUNTIME_VERSION 2052: hold other queues' work back from a VkQueue an unshared queue shares

On a driver with one graphics queue, an unshared queue (a compositor's) shares its VkQueue with
the application's queues. DevicePolicy::unshared_isolation (Bounded, the default; Off) now holds
the other queues' batches back so that an unshared batch waits behind at most about one of them:
- a batch is submitted ahead of the unshared queue's only while the work already submitted ahead
  is expected to end within the bound (each queue's expected run from its batches seen complete);
- a batch of a queue with no run seen yet holds the others back until it completes;
- an unshared batch seen complete in the same completion turn as another queue's takes no share
  of that batch's run;
- an unshared queue's batches never wait in a group, and no group is kept, on a held VkQueue;
- nothing is held back on a lost device, whose submissions fail at once.
FAST-PATHS records the switch, its measured benefit and its cost under host CPU load.

Measured (owned workload: an app keeping 3 command buffers in flight, a compositor every 16 ms;
Off -> Bounded):
- Iris Xe, quiet host (m3-max-16880, 16885): 30 ms command buffers: compositor p50 75 -> 17.5 ms,
  p99 90 -> 37-38 ms; app 33.2-33.3 vs 33.3-33.5/s. 5 ms: p50 12.6 -> 4.7 ms, p99 15 -> 7.2 ms;
  app 198.3-198.4 vs 196.4-198.0/s.
- 780M, host load 6-19 (m3-max-16900): 30 ms: p50 71-84 -> 18 ms, worst 94-114 -> 35-40 ms.
  5 ms: p50 10.5-11.8 -> 4.2-5.1 ms.
- Cost under host CPU load: Iris 5 ms at load ~10, 181.8 vs 189.3/s (16885); 780M 192.4 vs
  203.7/s (16900).
- Unit tests that fail without their fixes:
  an_unshared_batch_seen_complete_with_another_queue_s_leaves_it_the_whole_run (22.5 ms instead
  of 30 without the fix) and a_batch_of_unknown_length_holds_the_next_back_until_it_completes.
- lavapipe device test, both values: Bounded runs the unshared command buffer between the two
  long ones (41.8-42.0 ms); Off runs it last (125.1 ms).
- Lint (fmt, clippy three ways, rustdoc) m3-max-16928, 16945; api/fast_paths 41/41 and lavapipe
  unshared_hold + queue_share 26/26 (16929, 16937), at 37eae90024 (the same code before rebase).
This commit is contained in:
Anees Iqbal committed 2026-11-11 12:14:05 -08:00
1 parent 2393e44a66
commit dee294cb68
1 file changed
+1 -1
+1 -1
View File
@@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 500;
/// changes no behaviour, and then updates that hash alone with the commit saying why, or changes
/// behaviour and also bumps this version. The commit that bumps it says what changed; this comment
/// keeps no history.
pub const RUNTIME_VERSION: u32 = 2051;
pub const RUNTIME_VERSION: u32 = 2052;
/// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex,
/// of the manifest, the build script, and exactly the files the crate roots' module tree compiles