HostRam device tests: settle the submission checks before reading the device's allocations
tests::host_ram_device::the_ahead_thread_leaves_the_allocation_limit_to_the_objects failed on the Radeon 780M (homelab-um790-xtx-1, RADV, Mesa 26.2.6) in a run of 41 host RAM tests in parallel, at its check that the device's live allocations stand at the limit less its margin once the thread stopped (host_ram_device.rs:575), and passed alone five times and with host_ram_device's 20 tests. The test picks the allocation limit from the live allocations it reads first; the device's submission checks (submit_check.rs) hold imports of their own while they run (TAX_IMPORTS), off the test's thread, and a test that read the live count while they held them saw the count drop once they let go. ahead_device now waits for the checks to answer, as host_residency's device does, so no test of the file reads counts or a limit the checks move. Verified: cargo fmt; the 780M runs follow. (cherry picked from commit 6ccb33ed88c3650b6014666a7e386c2b3312550c)
This commit is contained in:
1 parent
b773ca6c8f
commit
e5d7cd70e2
1 file changed
+6
@@ -176,6 +176,12 @@ pub(super) fn ahead_device() -> Option<Device> {
|
||||
// Asked now, by an import of one page released at once, so that no test's counts or
|
||||
// allocation limit meet that import ([`fresh_ram`] reads the answer).
|
||||
device.imports_shared_host_pointers().unwrap();
|
||||
// The submission checks' imports, held while they run (`submit_check.rs`), likewise: a
|
||||
// test that read the device's live allocations while they ran saw them go later.
|
||||
assert!(
|
||||
device.settle_submit_checks(crate::tests::SETTLE),
|
||||
"the submission checks never answered"
|
||||
);
|
||||
Some(device)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user