Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

docs: limit shared arena backing to dev shm

Go4f5d0860d735
diff --git a/src/core/pinned.cu b/src/core/pinned.cu
index 49bb5c478..b64eb52a7 100644
--- a/src/core/pinned.cu
+++ b/src/core/pinned.cu
@@ -53,7 +53,8 @@ static_assert(sizeof(SharedArenaHeader) <= kSharedArenaHeaderBytes);
// A 2 MB-aligned reservation. Large pages first, then the largest alignment the OS will give us for free.
// A non-empty shared_file instead maps one file whose first 4 KiB identify the pack and whose remaining bytes
-// are the resident arena. Keeping the header inside the same mapping also works for tmpfs and hugetlbfs.
+// are the resident arena. This shared-file layout is intended for tmpfs (/dev/shm); hugetlbfs would need
+// hugepage-aligned file size and arena offset rather than the 4 KiB header layout used here.
void* reserve(uint64_t bytes, PageBacking& got, std::string& note, const std::string& shared_file,
uint64_t shared_pack_hash, void*& mapping_base, uint64_t& mapping_bytes) {
mapping_base = nullptr;
diff --git a/src/program/generate.cpp b/src/program/generate.cpp
index e75ac2c82..d811728bf 100644
--- a/src/program/generate.cpp
+++ b/src/program/generate.cpp
@@ -438,7 +438,7 @@ void usage() {
" The A/B arm: the mmap's rate depends on the OS page cache holding\n"
" 34 GB, and measured 71.97 vs 34.78 ms/token cold vs warm.\n"
" --shared-expert-arena FILE Linux: back the resident arena with one MAP_SHARED file.\n"
- " Put this file on /dev/shm or hugetlbfs, not ordinary SSD storage.\n"
+ " Put this file on /dev/shm, not ordinary SSD storage.\n"
" A small header binds an existing backing file to the same pack.\n"
" --resident-cpu-experts with mmap and a static profile, keep CPU misses resident in ordinary RAM.\n"
" Borrowed GPU-cache entries may read from mmap during prompt prefill.\n");