fix: drop the pack and MTP files' page cache before the NUMA placement

This commit is contained in:
Baptiste Rajaut authored and Niko1221 committed 2026-10-20 10:22:05 +02:00
1 parent 06425cf932
commit 393eec80f9
3 files changed
+26

No files matched your search

+11
View File
@@ -7990,6 +7990,17 @@ int main(int argc, char** argv) {
}
src.stage_lend_regions(std::move(stage_lends));
}
{ // the pack's and the MTP head's files: read at start, their cache is given back by the complement's drop
std::vector<std::string> drop;
for (const std::string& d : {o.pack, o.mtp}) {
std::error_code ec;
if (d.empty()) continue;
if (std::filesystem::is_regular_file(d, ec)) { drop.push_back(d); continue; }
for (const auto& f : std::filesystem::directory_iterator(d, ec))
if (f.is_regular_file(ec)) drop.push_back(f.path().string());
}
src.set_extra_drop_files(std::move(drop));
}
const std::vector<std::pair<int32_t, int32_t>>& rank_all = profile_all.empty() ? profile : profile_all;
bool resident_ok = src.pin_cache_complement(xcache, err, o.resident_pin, stage_pairs, lend_from,
o.resident_headroom, o.resident_budget, &rank_all);