checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.79k stars 565 forks source link

Put a cap on the size of single preadv in restore operation. #2242

Closed osctobe closed 11 months ago

osctobe commented 11 months ago

While each preadv() is followed by a fallocate() that removes the data range from image files on tmpfs, temporarily (between preadv() and fallocate()) the same data is in two places; this increases the memory overhead of restore operation by the size of a single preadv. Uncapped preadv() would read up to 2 GiB of data, thus we limit that to a smaller block size (128 MiB).

codecov-commenter commented 11 months ago

Codecov Report

Patch coverage has no change and project coverage change: +0.06% :tada:

Comparison is base (e1cda9f) 70.57% compared to head (1583bf8) 70.64%.

:exclamation: Current head 1583bf8 differs from pull request most recent head a713f6e. Consider uploading reports for the commit a713f6e to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## criu-dev #2242 +/- ## ============================================ + Coverage 70.57% 70.64% +0.06% ============================================ Files 133 133 Lines 33314 33321 +7 ============================================ + Hits 23513 23540 +27 + Misses 9801 9781 -20 ``` [see 5 files with indirect coverage changes](https://app.codecov.io/gh/checkpoint-restore/criu/pull/2242/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=checkpoint-restore)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.