gpu: add 6GB VRAM mip dropping, 16GB RAM pool caps/OOM recovery, and clear_air +inf clamp

This commit is contained in:
theme613 committed 2026-11-28 13:19:56 +08:00
1 parent 63b902fe17
commit c9067a7d3f
8 files changed
+366 -51

No files matched your search

+6
View File
@@ -1319,6 +1319,12 @@ mod relay_tests {
/// Snapshot memory kept for reuse (already touched, so no page faults).
static POOL: Mutex<Vec<Vec<u8>>> = Mutex::new(Vec::new());
/// Drops pooled CPU snapshot buffers during critical host commit pressure.
pub(crate) fn trim_snapshot_pool() {
let gone = std::mem::take(&mut *POOL.lock().unwrap_or_else(|e| e.into_inner()));
drop(gone);
}
/// An empty buffer with room for `n` bytes, from the pool if it has one
/// of about that size: a small copy's snapshot took the 174 MB buffer kept
/// for the big heap's, which then got another, until eight of them were