fd blocks: a buffer's making starts no in-place check
The full runtime gpucfg suite on PHOENIX at e03275c440 (job 11224, release) had 16 failures in completion_here, draw_again, host_residency, teardown_threads, waiter_submits and pointer_residency. The fd set itself passed 3/3. The failing tests count device-wide state (recorded commands, host-import residency, threads at teardown, completions). With this branch the first buffer a device made asked fd_blocks_checked, which went through in_place_verdict and started the in-place check in the background wherever its verdicts were pending: on every program's first run on a driver, and in every test with a fresh shader cache. The check's own buffers, imports and command buffers then ran among the program's, as tests::recycle showed exactly (472 vs 490-505 recycled under load). fd_blocks_checked now reads the verdicts without starting the check. The runtime's own buffers lie in exportable blocks once the verdicts are known: from the check's record as the device is made, or once a check that a texture over host pages or Device::settle_in_place_checks started has answered. Until then they lie in plain blocks, counted fd_blocks_awaited, as before. The recycle tests' settle (3297613ce2's) is removed: it would now start a check the tests have no use for. Docs: - in_place.rs, memory.rs, WorkCounts::fd_blocks_awaited and the bench's arm doc say who starts the check. - The FAST-PATHS Private row drops the unsettled-runtime numbers (taken while a buffer started the check): until the verdicts are known the blocks are plain, as the base's. The settled numbers stand. Verification is pending: the full suite at this tip and at development, side by side on PHOENIX. (cherry picked from commit 289b04fae4ce20bed3b2ebe92e6b693e7d4a8e0b)
This commit is contained in:
1 parent
23be585d37
commit
33f1fecac1
6 files changed
+29
-27
No files matched your search
@@ -142,7 +142,8 @@
|
||||
//! the next device's check runs that class and access again (`encode`), its note saying which
|
||||
//! the cause was. A program that will make such textures
|
||||
//! starts the check earlier, where it likes, through `Device::settle_in_place_checks` (with no
|
||||
//! wait: a zero timeout).
|
||||
//! wait: a zero timeout). A buffer's making starts none: until the verdicts of exportable
|
||||
//! blocks are known the runtime's own buffers lie in plain blocks ([`Device::fd_blocks_checked`]).
|
||||
//! - **Visibility.** A command reads the image's texels in the memory a buffer over the same pages
|
||||
//! reads: the pages' host-visible, host-coherent import (a dma-buf's own import is of the same
|
||||
//! memory type). So a CPU write reaches a command through the image as it reaches the buffer's
|
||||
@@ -1262,11 +1263,16 @@ impl Device {
|
||||
|
||||
/// Whether the runtime's own buffers lie in blocks allocated exportable (`memory.rs`'s
|
||||
/// "Buffers in exportable blocks"), by the device's verdicts ([`fd_blocks_take`]), asked as
|
||||
/// such a buffer is made: a pending verdict starts the check, and the buffer lies in a plain
|
||||
/// block meanwhile, as it does where the verdicts refuse such blocks; each counted
|
||||
/// (`WorkCounts::fd_blocks_awaited`, `WorkCounts::fd_blocks_refused`). Never waits.
|
||||
/// such a buffer is made: where a verdict is pending the buffer lies in a plain block, as it
|
||||
/// does where the verdicts refuse such blocks; each counted (`WorkCounts::fd_blocks_awaited`,
|
||||
/// `WorkCounts::fd_blocks_refused`). Never waits, and starts no check: the verdicts come from
|
||||
/// the check's record as the device is made, or from a check a texture over host pages or
|
||||
/// `Device::settle_in_place_checks` started. A check a buffer's making started would run
|
||||
/// beside every program from its first buffer, its own buffers, imports and command buffers
|
||||
/// among the program's, where a program that makes no texture over host pages has no use
|
||||
/// for it.
|
||||
pub(crate) fn fd_blocks_checked(&self) -> bool {
|
||||
let verdict = |class, access, rows| self.in_place_verdict(class, access, rows);
|
||||
let verdict = |class, access, rows| self.shared().in_place.verdict(class, access, rows);
|
||||
match fd_blocks_take(verdict) {
|
||||
FdBlocksTake::Take => true,
|
||||
FdBlocksTake::Pending => {
|
||||
|
||||
@@ -89,8 +89,10 @@
|
||||
//! buffer it starts `PREINITIALIZED`. So the buffers lie there only once the device's in-place
|
||||
//! check of such blocks (`in_place.rs`'s `PagesClass::FdBlocks`) passed what a texture over one
|
||||
//! takes that it takes over a plain block's (`in_place.rs`'s `fd_blocks_take`): from the check's
|
||||
//! record as the device is made, else once its check answered, in plain blocks until then
|
||||
//! (`WorkCounts::fd_blocks_awaited`) and where it refused them (`fd_blocks_refused`). A
|
||||
//! record as the device is made, else once its check answered (a check a texture over host
|
||||
//! pages or `Device::settle_in_place_checks` started; a buffer's making starts none), in plain
|
||||
//! blocks until then (`WorkCounts::fd_blocks_awaited`) and where it refused them
|
||||
//! (`fd_blocks_refused`). A
|
||||
//! two-plane texture's planes over such a buffer are read through the texel buffer, the
|
||||
//! device's conversion image not made (`ycbcr_planes_images_kept_exportable_block`): the check
|
||||
//! covers single-plane images alone. On a Radeon 780M (RADV) a block's `vkAllocateMemory` of a
|
||||
|
||||
@@ -35,8 +35,9 @@
|
||||
//! (`WorkCounts::buffer_blocks_made_ahead`), allocated exportable where the device's check of
|
||||
//! such blocks passed (`memory.rs`'s "Buffers in exportable blocks"); the second settles the
|
||||
//! device's in-place check before the phases, as a device of a driver whose check's record
|
||||
//! holds its verdicts knows them as it is made, where the first's check runs beside them, as a
|
||||
//! driver's first device's does.
|
||||
//! holds its verdicts knows them as it is made, where the first starts no check (a buffer's
|
||||
//! making starts none), its blocks plain, as a driver's first device's are until a texture over
|
||||
//! host pages starts the check and it answers.
|
||||
//! - **System heap, 64 MiB**, **System heap, 16 MiB** and **System heap, 4 MiB**: allocations of
|
||||
//! the device's first memory type that is host-visible and host-coherent but not device-local or
|
||||
//! cached (where a unified-memory device's `Private` blocks lie, `memory.rs`, `candidates`), of
|
||||
|
||||
@@ -28,10 +28,6 @@
|
||||
//! the same length was filled and released: the inplace-surface probe's `fresh` mode).
|
||||
//! - **Each frame's buffers, recycled.** Eight `Private` buffers made, filled and released each of
|
||||
//! sixty frames take parked buffers from the second frame on.
|
||||
//!
|
||||
//! Each test's device settles its check of textures over host pages before the test counts: the
|
||||
//! check, which a buffer's making starts where its verdicts are pending, parks and recycles
|
||||
//! buffers of its own while it runs.
|
||||
|
||||
use super::blit_holds::{Scratch, WAIT};
|
||||
use crate::recycle;
|
||||
@@ -65,12 +61,7 @@ fn device(cache: &Path) -> Device {
|
||||
},
|
||||
..DeviceOptions::default()
|
||||
};
|
||||
let device = Device::system_default_with(&options).unwrap();
|
||||
// The device's check of textures over host pages, which its first buffer's making starts
|
||||
// (`in_place.rs`'s `fd_blocks_checked`), parks and recycles buffers of its own as it runs:
|
||||
// settled before a test counts, so the counts are the test's own.
|
||||
device.settle_in_place_checks(WAIT);
|
||||
device
|
||||
Device::system_default_with(&options).unwrap()
|
||||
}
|
||||
|
||||
fn descriptor() -> TextureDescriptor {
|
||||
|
||||
@@ -5075,8 +5075,10 @@ pub struct WorkCounts {
|
||||
pub plain_buffer_blocks_made: u64,
|
||||
/// The buffers of the runtime's own and the program's made so far in a plain block, not one
|
||||
/// allocated exportable, on a device that allocates such blocks, while the device's in-place
|
||||
/// check of them was pending (`in_place.rs`'s `Device::fd_blocks_checked`): its first run on a
|
||||
/// driver, before the check's record holds its verdicts. 0 once they are known. A buffer that
|
||||
/// check of them was pending (`in_place.rs`'s `Device::fd_blocks_checked`): on its first run
|
||||
/// on a driver, before the check's record holds its verdicts, until a check a texture over
|
||||
/// host pages or `Device::settle_in_place_checks` started answered (a buffer's making starts
|
||||
/// none). 0 once they are known. A buffer that
|
||||
/// declares its padding unobserved lies in a plain block wherever, and is not counted.
|
||||
pub fd_blocks_awaited: u64,
|
||||
/// As `fd_blocks_awaited`, once the device's check of such blocks found a texture over one's
|
||||
|
||||
+6
-6
@@ -1020,7 +1020,9 @@ driver's. Each is open work.
|
||||
policy takes textures in place by its check and that check of such blocks gave every texture
|
||||
over one what it takes over a plain block's buffer (`in_place::fd_blocks_take`,
|
||||
`texture/fd_blocks_cover.rs`, the in-place row above; plain blocks until it answered,
|
||||
`WorkCounts::fd_blocks_awaited`): on a Radeon 780M (RADV PHOENIX, Mesa
|
||||
`WorkCounts::fd_blocks_awaited`, the verdicts from the check's record or from a check a texture
|
||||
over host pages or `Device::settle_in_place_checks` started, a buffer's making starting none):
|
||||
on a Radeon 780M (RADV PHOENIX, Mesa
|
||||
26.2.4) a plain block's `vkAllocateMemory` holds every submission of the process while the
|
||||
kernel fills its pages, under the reservation the process's buffer objects share, and an
|
||||
exportable block, a buffer object of its own reservation, holds none. With a 64 MiB block of
|
||||
@@ -1033,11 +1035,9 @@ driver's. Each is open work.
|
||||
its pools growing by 64 MiB blocks made ahead; two runs each), the base took 13 and 12
|
||||
turnarounds of 8 ms or more on the quiet host and 103 and 17 on the fragmented one (19 and 4 of
|
||||
17 ms or more, the slowest 40.4 and 49.0 ms, the scheduler's thread waiting 350 and 311 ms on
|
||||
the kernel's lock); with the blocks exportable, none on the fragmented host (the slowest 5.9
|
||||
and 6.0 ms, 21 and 24 ms waited) and one each on the quiet one, where 3 blocks were made plain
|
||||
while the device's first check was pending (446 and 447 buffers awaited it); with the check's
|
||||
verdicts known first, as from its record, none in either phase (the slowest 7.1 ms, 4 and 10
|
||||
ms waited). In the arm whose 64 `Private` buffers of 32 MiB were made
|
||||
the kernel's lock); with the check's verdicts known first, as from its record, the blocks
|
||||
exportable and none in either phase (the slowest 7.1 ms, 4 and 10 ms waited). Until the
|
||||
verdicts are known the blocks are plain, as the base's. In the arm whose 64 `Private` buffers of 32 MiB were made
|
||||
before the phases, in plain blocks, the first turnaround took 57.0 ms and none after it 1.4 ms;
|
||||
with 64 exportable blocks held, the first took 2.4 to 8.1 ms. The trade: each such block held
|
||||
costs every
|
||||
|
||||
Reference in new issue
Block a user