Linux: io prefetch + decode gate by default for experts.bin packs when the page cache has room for 55% of the experts
Zero-copy does not apply to experts.bin (one contiguous blob the kernels already read from the mapping), but the io_fill_ prefetch path does. RTX 3060, IQ3_XXS 43 GB pack, 32 GB cgroup: decode 1.38/1.21/1.33x (5/5 pairs), prompts 1.04/1.06x. At 16 GB the cold 4K prompt was 4-6% slower, so it stays off below the room test and the log says how to force it. Identity gates 10/10, exact_pp 4K/20K identical.
This commit is contained in:
1 parent
74e25e165b
commit
ecf2bdcb7f
4 files changed
+37
-6
No files matched your search
@@ -1596,6 +1596,11 @@ uint64_t gate_cache_room() {
|
||||
}
|
||||
}
|
||||
|
||||
double FileExpertSource::cache_room_ratio() const {
|
||||
const uint64_t total = expert_bytes(), room = gate_cache_room();
|
||||
return total == 0 || room == 0 ? 0.0 : (double) room / (double) total;
|
||||
}
|
||||
|
||||
void FileExpertSource::gate_capacity() {
|
||||
if (!gate_on_ || (gate_win_++ % 16) != 0) return;
|
||||
const uint64_t total = expert_bytes(), room = gate_cache_room();
|
||||
|
||||
Reference in new issue
Block a user