#6393 [Engine] admit oversized conversations to the existing SSD cache

open · @Held0fTheWelt · 0 comentários · No GitHub

AMD / HIPNVIDIA / CUDAWindows

Descrição

## Problem and result

Current main can reject a single-stage conversation snapshot at the RAM cache budget before the existing SSD tier gets a chance to keep it. This patch lets a profitable oversized snapshot enter that tier when the SSD capacity and physical RAM checks pass. Other parked conversations can stay in RAM.

## Related discussion

The admission-only patch and the portable test result were discussed in #5835. This draft targets the SSD spill implementation already on main. Scope feedback is pending.

## Approach

Check the SSD tier's capacity and estimated cost before capturing the snapshot. Leave the physical memory floor in place. On Windows, retry the admission or restore check after trimming pageable mappings when needed. Join pending GPU copies before the writer reads the host buffers. The SSD tier continues to use the existing cache format and settings.

## Validation

**Passed:**
- Windows x64 with Visual Studio 2026 MSVC 18.11.3, commit `d0b375815`. Compiled `engine/src/core/conversation_spill_test.cpp` and `engine/src/core/conversation_file.cpp` with `cl /std:c++20 /EHsc /utf-8 /Iengine\include`. The test executable reported 76 checks and zero failures.
- `git diff --check upstream/main...HEAD` returned 0.

**Failed:**
- None observed in those checks.

**Not run:**
- Full CUDA, HIP, SYCL or Metal builds and an end-to-end capture and restore using this PR head.

## Limits

The new path applies to single-stage snapshots. The portable test checks cache invariants and SSD capacity. Runtime performance on the affected backends remains unverified.

No site

Links install, modelos, releases.