Repository navigation
Commit 77bbece
committed
fix(optimizer): drop the checkpoint's copy of the capped state from the cache
With a cap set, save_to and load_from already release the store's own bucket
files to the window, but the other end of each copy, the checkpoint's bucket
file, still stayed in the page cache: a resume read the whole saved state
into it and a save wrote the whole state into it, right before the rollout
handoff the cap is meant to protect.
Under a cap, each checkpoint-side copy is now written back and dropped as
soon as it is copied, through a short-lived fd since the window needs one
that outlives the call. The store test checks that the checkpoint's bucket
files are uncached after both a save and a load; it fails without this
change.1 parent 8fcaafb commit 77bbece
3 files changed
Lines changed: 29 additions & 4 deletions
File tree
- docs/advanced
- miles_plugins/optimizers
- tests/fast-gpu
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
157 | 165 | | |
158 | 166 | | |
159 | 167 | | |
| |||
588 | 596 | | |
589 | 597 | | |
590 | 598 | | |
591 | | - | |
| 599 | + | |
| 600 | + | |
592 | 601 | | |
| 602 | + | |
| 603 | + | |
593 | 604 | | |
| 605 | + | |
594 | 606 | | |
595 | 607 | | |
596 | 608 | | |
| |||
631 | 643 | | |
632 | 644 | | |
633 | 645 | | |
634 | | - | |
| 646 | + | |
| 647 | + | |
635 | 648 | | |
636 | 649 | | |
| 650 | + | |
637 | 651 | | |
638 | 652 | | |
639 | 653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
193 | 203 | | |
194 | 204 | | |
195 | 205 | | |
| |||
200 | 210 | | |
201 | 211 | | |
202 | 212 | | |
| 213 | + | |
203 | 214 | | |
204 | 215 | | |
205 | 216 | | |
206 | 217 | | |
207 | 218 | | |
208 | 219 | | |
| 220 | + | |
209 | 221 | | |
210 | 222 | | |
211 | 223 | | |
| |||
0 commit comments