What: a merge or import tax answer now stands as far as it earned
(`Stands`). A merge `Holds` clear of the load and repeated, an import tax
`Holds` past its margin and repeated, and an `Unchecked` of a refused call
or a device with no pointer import are recorded. A `Fails` clear of the
load whose every try ran quiet stands for the device's life and is never
recorded. Every other answer stands for now: the checks' thread keeps its
command buffers and fence and checks it again 1, 2, 4 ... 64 s after the
first answers, then each minute, until none stands for now. A check again
replaces the verdict (tries that all split keep it), so a device whose
first merge answer was a loaded `Fails` groups once a check again answers
`Holds`. A record's `Fails` is a hint and no answer: a device that reads
one checks that check again at its making. Before each round and each
submission of a phase the checks stand by, at most 20 ms, until the
device's work is quiet (`DeviceShared::work_quiet_for`, shared with the
checks' thread through `WorkShare`).
The stop rule's thresholds (`Load::ran_quiet`): every stand-by found the
device's work quiet, no round or submission took past QUIET_ROUND_MOST
(2 ms, from its first call to its fence's reset), and all of them no more
than QUIET_TRY_MOST (30 ms). A merge `Fails` must also be clear
(MERGE_FAILS_CLEAR, 0.75 of the calls apart) and repeated
(MERGE_REPEATS); an import tax `Fails` must agree in its halves with a
held import adding at most half its bound (TAX_FAILS_CLEAR).
Why: on the Radeon 780M beside other jobs (m3-max-39740, load average
18-24 on 16 threads), two of four devices answered merge `Fails` at 0.72
and 0.745, both forms lifted by about the same 58-80 us, short of the
record but held for the device's life, so those processes grouped no
batch at all. At 0.75 and up with its repeats, the same load would have
written a `Fails` record that every later device of that release read
without checking. Threads of the process's own spinning or touching fresh
pages (m3-max-39786, 2x the host's threads) lifted every call alike and
left all eight devices at `Holds` (0.23-0.64), so the device test injects
the observed shape instead (`lift_next_merge_tries`: 70 us on the first
call of every round, its stand-bys not quiet).
Costs: a driver that does not merge or whose imports cost nothing pays
that check at every device's making, as before any record, and once more
at least where no try of its first answer ran quiet. An answer for now
costs a check again at each step of the schedule. The import tax is
included: a loaded tax `Fails` placed the device's long buffers in fresh
pages for its life on a driver whose imports do cost (39740's
b202c-bench run: 148.6 against 121.5 us, short of its margin).
CHECK_VERSION 9 (a record may hold no answer of a check, and a `Fails` in
one is no answer). Tests: unit tests of what each answer earns, the
schedule, the quiet bounds and the record; device tests that a recorded
`Fails` is checked again and that a lifted merge answer is checked again
and comes to the answer of a device beside it, with no `Fails` recorded.
in_place_check takes its answers through `answer_next_device`, since a
record can no longer hold a `Fails` as an answer. Forced verdicts
(`SubmitChecks::force`) stand for the device's life.
With it: the drag bench reports the submission checks' answers before and after its measurements
(test only); a lifted try's count goes down by AtomicU32::try_update (fetch_update's new name).
Verified (launchreg lane, tip 942672e8cb = these three commits on development 01415e33d6):
m3-max-39884 (msi): clippy -D warnings plain, m2v_cpu_icd and m2v_gpu 0; lavapipe submit_check,
in_place_check, teardown_threads, relay_facts, fresh_pages, padding_unobserved, host_ram_dma_buf,
dma_buf_parked_images, exported_textures, icb_records_policy, pointer_residency, fast_paths,
queue_quiet and view_check 114/114; view_check_device's stand-by test 3/3. The control (the fix
without the re-check of loaded and recorded answers) fails the new device tests as meant: lavapipe
(m3-max-39818) 2 of 2, RX 550 (39863) 2 of 2, Radeon 780M (39885) the recorded-Fails test; the fix
passes 26/26 on the RX 550 and the 780M. On the 780M (39907, the fix on an earlier base) a device
made under host load answered merge Pending (one try split), then "Holds, recorded (14.4 us in one
call of 4 against 39.4 us apart)" after its re-checks, and grouped; every later device answered
Holds in 3 tries.