149: STRATA_COLD_OVERLAP=4 (zero-copy without the overlap); no residency query for RAM-resident experts

The zero-copy pre-pass ran mincore for every CPU expert of a layer, the RAM copy's too: -2..-9% decode
with an 18 GiB RAM tier. It now skips the RAM-resident and override experts (b32: 0.98/0.97/0.91 ->
1.05/1.10/1.08 vs mode 0, 3 pairs). A file without a residency query (not Linux) never goes zero-copy.
This commit is contained in:
Niko1221 committed 2026-10-18 07:12:43 +02:00
1 parent c85cc6dd19
commit 2044864dba
1 file changed
+3
+3
View File
@@ -1637,6 +1637,9 @@ void FileExpertSource::claim_todo(int64_t layer, const int64_t* experts, int64_t
for (int64_t i = 0; i < n; ++i) {
const int64_t e = experts[i];
if (e < 0 || e >= n_expert_) continue;
const size_t index = (size_t) layer * (size_t) n_expert_ + (size_t) e;
if (complement_ready_ && resident_blob(index) != nullptr) continue; // in the RAM copy: no residency query
if (!override_.empty() && override_[index] != nullptr) continue;
uint64_t total = 0;
const uint64_t c = cached_bytes(layer, e, total, true);
zc_ok[(size_t) i] = total > 0 && c >= total ? 1 : 0; // no residency query (not Linux): never