criu
criu copied to clipboard
Pre-dump produces too big memory overhead
Current pre-dump mode suffers from several issues
- It keeps all the memory in pipes, and their number can be huge due to limited one pipe size
- It keeps all the memory in pipes and this memory is unreclaimable for that period
- It infects tasks to drain memory from
We can try to use sys_read_process_vm() syscall to mitigate all of the above
- No pipes, just copy data into temp buffer and send
- Memory is always reclaimable
- No infection is needed, just freeze, reset the tracker and proceed
Ideally there should be sys_splice_process_vm() syscall in the kernel :)
Here is a prototype https://github.com/avagin/criu/tree/process_vm_readv
If we use sys_read_process_vm(), we can't dump memory which are not accessible to read. Currently we call add PROT_READ by mprotect(), add pages into pipes, and restore vma_prot.
Here is a draft version of sys_process_vmsplice: https://github.com/avagin/linux-task-diag/commits/process_vmsplice
As this was completed by Abhishek in GSoC 2019, should we close this issue?
A friendly reminder that this issue had no activity for 30 days.
A friendly reminder that this issue had no activity for 30 days.
A friendly reminder that this issue had no activity for 30 days.