Commit 98d25dc
committed
perf: pre-warm reconstruction cache at open()
warm_reconstruction_cache() fires a background tokio task at open() that
fetches the full-file reconstruction plan from CAS. A watch::Receiver signals
completion; the first read() awaits it only if the warmup is not yet done.
For workloads with any gap between open() and the first read (safetensors
header parsing, Python overhead), the CAS round-trip overlaps with userspace
work and adds zero latency to reads.
FUSE open replies with FOPEN_KEEP_CACHE so the kernel page cache is reused
across re-opens of the same file.1 parent ddd6635 commit 98d25dc
3 files changed
Lines changed: 53 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
| 465 | + | |
| 466 | + | |
476 | 467 | | |
477 | 468 | | |
478 | 469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
| 1247 | + | |
| 1248 | + | |
1247 | 1249 | | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
1248 | 1263 | | |
1249 | 1264 | | |
1250 | 1265 | | |
1251 | 1266 | | |
1252 | 1267 | | |
1253 | | - | |
| 1268 | + | |
1254 | 1269 | | |
1255 | 1270 | | |
1256 | 1271 | | |
| |||
1380 | 1395 | | |
1381 | 1396 | | |
1382 | 1397 | | |
1383 | | - | |
| 1398 | + | |
1384 | 1399 | | |
| 1400 | + | |
1385 | 1401 | | |
1386 | 1402 | | |
1387 | 1403 | | |
| |||
1411 | 1427 | | |
1412 | 1428 | | |
1413 | 1429 | | |
1414 | | - | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
1415 | 1436 | | |
1416 | 1437 | | |
1417 | 1438 | | |
| |||
2811 | 2832 | | |
2812 | 2833 | | |
2813 | 2834 | | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
2814 | 2838 | | |
2815 | 2839 | | |
2816 | 2840 | | |
| |||
2886 | 2910 | | |
2887 | 2911 | | |
2888 | 2912 | | |
| 2913 | + | |
2889 | 2914 | | |
2890 | 2915 | | |
2891 | 2916 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| 49 | + | |
| 50 | + | |
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
47 | | - | |
48 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
49 | 64 | | |
50 | 65 | | |
51 | 66 | | |
| |||
114 | 129 | | |
115 | 130 | | |
116 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
117 | 138 | | |
118 | 139 | | |
119 | 140 | | |
| |||
0 commit comments