loader/gpu: port VICTORY_OUTPUT resolution patch, F1 output option, and ask_ahead kept early-out
This commit is contained in:
1 parent
c9067a7d3f
commit
84b4509fa3
6 files changed
+451
-6
No files matched your search
@@ -322,10 +322,21 @@ const AHEAD_MAX: usize = (1 << 30) / PAGE;
|
||||
/// Asks the kernel about many ranges `(start, end)` at once, before the
|
||||
/// [`writes`] of each: ranges close together are one asking, and `writes`
|
||||
/// then answers from the journal until [`ask_ahead_done`]. The world's
|
||||
/// Whether the submission's one-shot asking (`ask_once`) already covers
|
||||
/// write-watch queries, so per-flush `ask_ahead` calls are no-ops.
|
||||
pub(crate) fn kept_active() -> bool {
|
||||
journal().kept
|
||||
}
|
||||
|
||||
/// submissions refresh thousands of host copies (6,664 askings a frame,
|
||||
/// 456 ms, in run 14). Ranges that are not write-watched, or lie alone, are
|
||||
/// left to `writes`.
|
||||
pub(crate) fn ask_ahead(ranges: &[(usize, usize)]) {
|
||||
// The submission's one asking stands ([`ask_once`]): check before
|
||||
// allocating, filtering, or sorting thousands of ranges.
|
||||
if journal().kept {
|
||||
return;
|
||||
}
|
||||
let mut pieces: Vec<(usize, usize)> = ranges
|
||||
.iter()
|
||||
// Not view memory known by its bits: the kernel would refuse the
|
||||
@@ -337,11 +348,6 @@ pub(crate) fn ask_ahead(ranges: &[(usize, usize)]) {
|
||||
return;
|
||||
}
|
||||
pieces.sort_unstable();
|
||||
// The submission's one asking stands ([`ask_once`]): what it does not
|
||||
// hold is left to `writes`.
|
||||
if journal().kept {
|
||||
return;
|
||||
}
|
||||
let _all = Asking::hold_all();
|
||||
let (mut asked, mut written) = (Vec::new(), Vec::new());
|
||||
let mut i = 0;
|
||||
|
||||
Reference in new issue
Block a user