Forked ckpt improvement (support shared memory, etc.) #1222
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a draft PR -- still a work in progress. But we can support full forked ckpt (including shared memory), with only a little extra code.
Support shared memory for forked ckpt
type = AREA_SHARED, AREA_NONSHARED, AREA_DONE, AREA_ALL
Then write AREA_SHARED, then fork, and then AREA_NONSHARED.
This assumes AREA_SHARED is smaller, and will not delay the parent,
when writing this small amount of memory to the checkpoint image file.
ALSO: *.dmtcp.temp to *.dmtp only when done, and unlink previous ckpt file when we begin a new ckpt.
But I should revise this. Instead of unlinking the previous ckpt file, I should rename it to *.dmtcp.old, and then unlink it only when the new ckpt image file has been created.
TODO:
But this code would be ugly. So, maybe just let the user beware, and they can look for *.dmtcp.old instead.