Changes

Jump to: navigation, search

Google Summer of Code Ideas

346 bytes added, 12:23, 16 January 2019
Optimize the pre-dump algorithm
'''Summary:''' Optimize the pre-dump algorithm to avoid pinning to many memory in RAM
Current [[CLI/cmd/pre-dump|pre-dump]] mode suffers from several issuesis used to write task memory contents into imagefiles w/o stopping the task for too long. It does this by stopping the task, infecting it anddraining all the memory into a set of pipes. Then the task is cured and resumed and the pipes'contents is written into images (maybe a [[page server]]). This approach creates a big stresson memory subsystem, as keeping all the memory in pipes creates a lot of unreclaimable memory(pages in pipes are not swappable), as well as the number of pipes themselves can be buge (asone pipe doesn't store more than a fixed certain amount of data).
* 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 [[parasite code|stops and infects]] tasks to drain memory from We can try to use sys_read_process_vm() syscall to mitigate all of the above. Benefits:To do this weneed to allocate a temporary buffer in criu, then walk the target process vm by copying the* No pipesmemory piece-by-piece into it, just copy then flush the data into temp buffer and send* Memory is always reclaimable* No infection is neededimage (or page server), just freeze, reset the tracker and proceedthen repeat.
Ideally there should be sys_splice_process_vm() syscall in the kernel, that does the same as

Navigation menu