Enable --ple-io ram on Windows via VirtualLock
PleTable's Mmap+lock path now calls strata::platform::lock_resident (working-set minimum + VirtualLock, chunked per GiB) instead of refusing to start. A lock failure still falls back to touching the pages with a warning, same as the POSIX path. Changed as the plan asked: only a full VirtualLock counts (a partial one is unlocked again and said so), a warning when the table is more than half of the RAM, the usage text indent fixed. Compiled on Windows here (MSVC, CUDA 13.0); not run with --ple-io ram yet. (PR #813)
This commit is contained in:
1 parent
20b5005c7f
commit
61d5efab45
3 files changed
+31
-10
No files matched your search
@@ -651,7 +651,8 @@ void usage() {
|
||||
" --no-ple explicit diagnostic ablation of the PLE layer\n"
|
||||
" --ple-io direct|mmap|ram n-gram table reads (plan v0.3 P2). direct (default): unbuffered SSD\n"
|
||||
" reads, the table never enters RAM or the file cache; mmap: A/B arm;\n"
|
||||
" ram: mmap with the whole table locked in RAM at start (Linux/macOS)\n"
|
||||
" ram: the whole table locked in RAM at start (VirtualLock on Windows,\n"
|
||||
" mlock elsewhere), so no SSD read sits on the prompt or token path\n"
|
||||
" --ple-row-cache N bounded cache of fetched rows, 90 B each (default 1048576; 0 = off)\n"
|
||||
" --ple-inflight N outstanding SSD reads (default 256)\n"
|
||||
" --ple-delay-us U fault injection: each row read completes no earlier than U us\n"
|
||||
@@ -2058,12 +2059,6 @@ int main(int argc, char** argv) {
|
||||
std::fprintf(stderr, "strata generate: invalid --ple-io/--ple-row-cache/--ple-inflight/--ple-delay-us\n");
|
||||
return 2;
|
||||
}
|
||||
#if defined(_WIN32)
|
||||
if (o.ple_io == "ram") {
|
||||
std::fprintf(stderr, "strata generate: --ple-io ram is not available on Windows (no mlock); use --ple-io mmap\n");
|
||||
return 2;
|
||||
}
|
||||
#endif
|
||||
if (o.kv == "q4") o.kv = "q4_0";
|
||||
if (o.kv != "fp16" && o.kv != "int8" && o.kv != "q4_0" && o.kv != "k8v4") {
|
||||
std::fprintf(stderr, "strata generate: --kv must be fp16, int8, q4_0 or k8v4\n");
|
||||
|
||||
Reference in new issue
Block a user