Difference between revisions of "Google Summer of Code Ideas"

From CRIU
Jump to: navigation, search
(Add support for checkpoint/restore of CORK-ed UDP socket)
(Optimize the pre-dump algorithm)
Line 90: Line 90:
 
'''Summary:''' Optimize the pre-dump algorithm to avoid pinning to many memory in RAM
 
'''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 issues
+
Current [[CLI/cmd/pre-dump|pre-dump]] mode is used to write task memory contents into image
 +
files w/o stopping the task for too long. It does this by stopping the task, infecting it and
 +
draining 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 stress
 +
on 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 (as
 +
one 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
+
We can try to use sys_read_process_vm() syscall to mitigate all of the above. To do this we
* It keeps all the memory in pipes and this memory is unreclaimable for that period
+
need to allocate a temporary buffer in criu, then walk the target process vm by copying the
* It [[parasite code|stops and infects]] tasks to drain memory from
+
memory piece-by-piece into it, then flush the data into image (or page server), then repeat.
 
 
We can try to use sys_read_process_vm() syscall to mitigate all of the above. Benefits:
 
 
 
* 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, that does the same as
 
Ideally there should be sys_splice_process_vm() syscall in the kernel, that does the same as

Revision as of 12:23, 16 January 2019

Google Summer of Code (GSoC) is a global program that offers post-secondary students an opportunity to be paid for contributing to an open source project over a three month period.

This page contains project ideas for upcoming Google Summer of Code.

Suggested ideas

Post-copy for shared memory and hugetlbfs

Summary: TODO: Short description of the project

TODO: Detailed description of the project.

Links:

  • Wiki links to relevant material
  • External links to mailing lists or web sites

Details:

  • Skill level: beginner or intermediate or advanced
  • Language: C
  • Mentor: Mike Rapoport <rppt@linux.ibm.com>
  • Suggested by: Mike Rapoport <rppt@linux.ibm.com>


Optimize logging engine

Summary: TODO: Short description of the project

TODO: Detailed description of the project.

Links:

  • Wiki links to relevant material
  • External links to mailing lists or web sites

Details:

  • Skill level: beginner or intermediate or advanced
  • Language: C
  • Mentor: Andrei Vagin <avagin@gmail.com>
  • Suggested by: Andrei Vagin <avagin@gmail.com>


Add support for checkpoint/restore of cgroups v2

Summary: TODO: Short description of the project

TODO: Detailed description of the project.

Links:

Details:

  • Skill level: beginner or intermediate or advanced
  • Language: C
  • Suggested by: Person who suggested the idea


Add support for checkpoint/restore of CORK-ed UDP socket

Summary: Support C/R of corked UDP socket

There's UDP_CORK option for sockets. As man page says:

    If this option is enabled, then all data output on this socket
    is accumulated into a single datagram that is transmitted when
    the option is disabled.  This option should not be used in
    code intended to be portable.

Currently criu refuses to dump this case, so it's effectively a bug. Supporting this will need extending the kernel API to allow criu read back the write queue of the socket (see how it's done for TCP sockets, for example). Then the queue is written into the image and is restored into the socket (with the CORK bit set too).

Links:

Details:

  • Skill level: intermediate (+linux kernel)
  • Language: C
  • Mentor: Pavel Emelianov <xemul@virtuozzo.com>
  • Suggested by: Pavel Emelianov <xemul@virtuozzo.com>

Optimize the pre-dump algorithm

Summary: Optimize the pre-dump algorithm to avoid pinning to many memory in RAM

Current pre-dump mode is used to write task memory contents into image files w/o stopping the task for too long. It does this by stopping the task, infecting it and draining 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 stress on 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 (as one pipe doesn't store more than a fixed certain amount of data).

We can try to use sys_read_process_vm() syscall to mitigate all of the above. To do this we need to allocate a temporary buffer in criu, then walk the target process vm by copying the memory piece-by-piece into it, then flush the data into image (or page server), then repeat.

Ideally there should be sys_splice_process_vm() syscall in the kernel, that does the same as the read_process_vm does, but vmsplices the data

Links:

Details:

  • Skill level: advanced
  • Language: C
  • Mentor: Pavel Emelianov <xemul@virtuozzo.com>
  • Suggested by: Pavel Emelianov <xemul@virtuozzo.com>

Anonymize image files

Summary: Teach CRIT to remove sensitive information from images

When reporting a BUG it may be not acceptable for the reporter to send us raw images, as they may contain sensitive data. Need to teach CRIT to "anonymise" images for publication.

List of data to shred:

  • Memory contents. For the sake of investigation, all the memory contents can be just removed. Only the sizes of pages*.img files are enough.
  • Paths to files. Here we should keep the paths relations to each other. The simplest way seem to be replacing file names with "random" (or sequential) strings, BUT (!) keeping an eye on making this mapping be 1:1. Note, that file paths may also sit in sk-unix.img.
  • Registers.
  • Process names. (But relations should be kept).
  • Contents of streams, i.e. pipe/fifo data, sk-queue, tcp-stream, tty data.
  • Ghost files.
  • Tarballs with tmpfs-s.
  • IP addresses in sk-inet-s, ip tool dumps and net*.img.

Links:

Details:

  • Skill level: beginner
  • Language: Python
  • Mentor: Pavel Emelianov <xemul@virtuozzo.com>
  • Suggested by: Pavel Emelianov <xemul@virtuozzo.com>

Porting crit functionalities in GO

Summary: TODO: Short description of the project

TODO: Detailed description of the project.

Links:

  • Wiki links to relevant material
  • External links to mailing lists or web sites

Details:

  • Skill level: beginner or intermediate or advanced
  • Language: Go
  • Mentor: Adrian Reber <areber@redhat.com>
  • Suggested by: Adrian Reber <areber@redhat.com>