Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to change pre-dump strategy #2497

Open
abcsl123 opened this issue Oct 20, 2024 · 2 comments
Open

how to change pre-dump strategy #2497

abcsl123 opened this issue Oct 20, 2024 · 2 comments
Labels

Comments

@abcsl123
Copy link

Description
Hello everyone, I am a student with a strong interest in CRIU, and I’m currently hoping to make some modifications based on my own ideas. From what I understand, when CRIU continuously uses pre-dump, it only stores memory pages that have been dirtied since the last checkpoint. If I want to change this behavior, such as deciding whether to store dirty memory pages based on a specific strategy, which functions should I focus on? (It’s quite difficult for me to find them on my own.)

@avagin
Copy link
Member

avagin commented Oct 22, 2024

@abcsl123 I think you can start with __parasite_dump_pages_seized:
https://github.com/checkpoint-restore/criu/blob/criu-dev/criu/mem.c#L482C12-L482C40

@abcsl123
Copy link
Author

abcsl123 commented Oct 23, 2024

@abcsl123 I think you can start with __parasite_dump_pages_seized: https://github.com/checkpoint-restore/criu/blob/criu-dev/criu/mem.c#L482C12-L482C40

Thank you for your reply. @avagin
After reading this function, my understanding is that during a series of pre-dump and dump commands, if there have been previous pre-dump commands, executing the current command will turn non-softdirty pages into holes, thereby reducing consumption.(

criu/criu/mem.c

Line 225 in dfb56ee

if (has_parent && page_in_parent(softdirty)) {
)
However, why doesn’t it work as I expected during the dump? If all pages still need to be written, how can pre-dump reduce the frozen time during the dump? I’m very confused.
First pre-dump
00943b4eedfe4154b67e9f4760b7477c
Second pre-dump
c69df028dec271f847df459387126210
then dump
7f85800866bdc88738e449a6fe05834f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants