Commit c5eea10
committed
secret_freedom: Use fixed size bounce buffer for loading kernel
By using a MaybeBounce with N=0 we are allocating a bounce buffer that
matches exactly the number of bytes that need to be copied into guest
memory, e.g. the size of the kernel file. This is fairly expensive
performance wise, and the spike in memory usage from the firecracker
process is also unwanted. Thus, just use a 4096 byte fixed size buffer
through which we repeatedly read+memcpy.
Signed-off-by: Patrick Roy <[email protected]>1 parent 12290e4 commit c5eea10
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
| |||
279 | 282 | | |
280 | 283 | | |
281 | 284 | | |
282 | | - | |
| 285 | + | |
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
| |||
0 commit comments