A DirectStorage queue starts its requests at the title's submit, not at half its capacity
The title maps the pages of a batch, and fills in their page lists, in its own submit (image +0xe88f0): first the batch's mapping list (+0xf2c470, which writes the page lists at +0x55aa6a0), then the status entry, then our Submit. A list is a piece of one table, a number per 64 KiB of address range, that is only ever overwritten. Our queue submitted itself at half its capacity (2,079 of 4,159), which the title's batches (up to 4,095) pass three or four times a load: those requests ran up to 0.6 s before the lists were filled in, on page 0 (waited for) or on the page numbers an earlier mapping had left (known, so written: somebody else's memory). - A queue submits itself only when it is full of commands nobody submitted. VICTORY_DSTORAGE_HALF=1: at half, as before. - A list that changes during the write has its new pages written too. - "page list was not filled in yet" is said (as a warning) only of lists that were not: nearly all of its lines were waits for the page table's lock. - A read of a file the host refuses is logged and tried again, its destination opened again before. - VICTORY_DSTORAGE_TRACE=1 (a line per batch, and per request something is wrong with), 2 (every request). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
e1702e2204
commit
68e10e57d6
2 files changed
+479
-51
No files matched your search
@@ -722,6 +722,21 @@ pub(crate) fn pages_known(pages: &[usize], offset: usize, len: usize) -> bool {
|
||||
.is_some_and(|pages| pages.iter().all(|page| physical.pages.contains_key(page)))
|
||||
}
|
||||
|
||||
/// Where the title sees the pages under bytes `[offset, offset + len)` now,
|
||||
/// in order (for the streaming trace: whether that changed while a request
|
||||
/// wrote them).
|
||||
pub(crate) fn pages_shown(pages: &[usize], offset: usize, len: usize) -> Vec<(usize, usize)> {
|
||||
let physical = physical();
|
||||
let numbers = pages.get(offset / PAGE..(offset + len).div_ceil(PAGE)).unwrap_or_default();
|
||||
let mut shown: Vec<(usize, usize)> = numbers
|
||||
.iter()
|
||||
.filter_map(|n| physical.pages.get(n))
|
||||
.flat_map(|slice| physical.shown_at(slice, 1))
|
||||
.collect();
|
||||
shown.sort_unstable();
|
||||
shown
|
||||
}
|
||||
|
||||
/// Copies `data` into physical pages, from `offset` bytes into the first,
|
||||
/// whether or not they are mapped anywhere (DirectStorage destinations).
|
||||
/// One view per run of consecutive pages, not one per page: each view
|
||||
|
||||
Reference in new issue
Block a user