With the dma-buf class's pages imported on the Iris Xe (the commit before), two things showed,
both from one cause: ANV maps its exported memory uncached for the CPU, whatever the memory type
(job 7706: types 1 and 2 alike), so each byte the check reads there is a bus read of about 80 ns.
1. A flaky pass. The check's writer reads each byte before it rewrites it, sweep after sweep,
while the GPU stores; a sweep of a 101x51@512 window there takes about 2.7 ms, against a store
step of 0.1 to 0.8 ms, so it revisits a row's last line about 40 us apart instead of under a
microsecond, and rarely lands a write between the GPU's read of the line and its write-back.
The storage-write rounds of rows that end inside lines saw the padding change in 3 of 18
dma-buf rounds against 10 and 14 of 18 of the pointer and fresh-pages classes (job 7706), and
the dma-buf class passed storage writes inside lines in one fresh check of three (job 7688),
where its pass would have put a kernel's writes in place over kept padding on a guest's pages.
In that run every round agreed (none saw a change).
carried_store_failures: a class's failure of an access whose rounds store (renders: the pass's
clear and store, and the draw; storage writes and buffer writes: the kernel's stores), where
that class's reads of those row ends passed (so the failure is the stores', not the first
move's), fails the other classes' passes of that access and row ends. The line write-back
belongs to the store path every class's images share; how often a class's rounds see it does
not. A reads failure (whether the GPU sees the CPU's bytes depends on the class's mapping and
import), an unchecked verdict and a class whose pages could not be made carry nowhere. Each
carried failure is noted. To change no verdict a texture already took, the check now gives
its verdicts together once every class is done, not per class.
2. A 19 s check. Bytes::matches compared the window byte by byte: 2.7 s for each round of the
3840x2160 surface over the dma-buf pages (the fill took 4 ms). It now compares each period
whole first (slice equality, in wide loads) and looks for the byte only where one differs; a
cleared row's texels likewise, a chunk of zeros at a time.
CHECK_VERSION stays 9 (the commit before, not yet released).
Docs: the module's verdicts paragraph and run's, API.md's in-place check paragraph.
Test: a_store_failure_fails_the_other_classes_passes_and_nothing_else_carries (tests/in_place.rs),
the Iris's verdicts of the flaky run: the dma-buf class's pass of storage writes inside lines
alone fails, as the pointer class's failure; a failure of the dma-buf class's own carries to the
others; reads failures, an unchecked verdict and a store failure of a class whose reads failed
carry nowhere.
Verified: pending (the unit test with and without the rule, the Iris check time and verdicts in
release, the device test repeated, the 780M and lavapipe verdicts against development's).
(cherry picked from commit f2f0e284c2b62980bbc3f1e1881e01b2c8ce9227)