engine: the KV plan split, the host mirror, and --kv-resident bring-up

This commit is contained in:
C_Tamas committed 2026-10-24 19:19:19 +07:00
1 parent cce687bf2c
commit a9e627b7ca
44 files changed
+3118 -51

No files matched your search

+9
View File
@@ -19,4 +19,13 @@ bool cgroup_room(const std::string& dir, bool v2, int64_t* room);
void cgroup_levels(const std::string& root, std::string path, bool v2,
const std::function<bool(const std::string& dir, int64_t room)>& visit);
/* Whether `need` more bytes fit in host memory after `still` more this process will allocate first
* and `margin` (--host-headroom-mib) stays free, or why not. Checks MemAvailable; every memory
* cgroup from the process's own up to the visible root (Docker's --memory, enforced by the OOM
* killer); and, for an mlock()ed copy (`mlocks`), RLIMIT_MEMLOCK unless the process has
* CAP_IPC_LOCK. Pinned memory a card reads is a driver userptr mapping, which RLIMIT_MEMLOCK does
* not count. An unreadable limit is ignored, never guessed. Shared with kvstream/bringup.cpp,
* which checks the streamed group's host mirror before any rank takes one. */
bool lockable_room(int64_t need, int64_t still, int64_t margin, bool mlocks, std::string* why);
} /* namespace rad */