Difference between revisions of "Linux kernel"

From CRIU
Jump to navigation Jump to search
m
 
(4 intermediate revisions by 3 users not shown)
Line 8: Line 8:
 
** <code>CONFIG_UTS_NS=y</code> (Namespaces support -> UTS namespace)
 
** <code>CONFIG_UTS_NS=y</code> (Namespaces support -> UTS namespace)
 
** <code>CONFIG_IPC_NS=y</code> (Namespaces support -> IPC namespace)
 
** <code>CONFIG_IPC_NS=y</code> (Namespaces support -> IPC namespace)
 +
** <code>CONFIG_SYSVIPC_SYSCTL=y</code>
 
** <code>CONFIG_PID_NS=y</code> (Namespaces support -> PID namespaces)
 
** <code>CONFIG_PID_NS=y</code> (Namespaces support -> PID namespaces)
 
** <code>CONFIG_NET_NS=y</code> (Namespaces support -> Network namespace)
 
** <code>CONFIG_NET_NS=y</code> (Namespaces support -> Network namespace)
Line 19: Line 20:
 
** <code>CONFIG_PACKET_DIAG=y</code> (Packet socket -> Packet: sockets monitoring interface)
 
** <code>CONFIG_PACKET_DIAG=y</code> (Packet socket -> Packet: sockets monitoring interface)
 
** <code>CONFIG_NETLINK_DIAG=y</code> (Netlink socket -> Netlink: sockets monitoring interface)
 
** <code>CONFIG_NETLINK_DIAG=y</code> (Netlink socket -> Netlink: sockets monitoring interface)
 +
* <code>CONFIG_NETFILTER_XT_MARK=y</code> (Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> Core Netfilter Configuration -> Netfilter Xtables support (required for ip_tables) -> nfmark target and match support)
 +
* <code>CONFIG_TUN=y</code> (Networking support -> Universal TUN/TAP device driver support)
 +
  
 
Other options not required by CRIU, but C/R supported ([[ZDTM test suite]] may fail without them):
 
Other options not required by CRIU, but C/R supported ([[ZDTM test suite]] may fail without them):
 
* <code>CONFIG_INOTIFY_USER=y</code> (File systems -> Inotify support for userspace)
 
* <code>CONFIG_INOTIFY_USER=y</code> (File systems -> Inotify support for userspace)
 
* <code>CONFIG_FANOTIFY=y</code> (File systems -> Filesystem wide access notification)
 
* <code>CONFIG_FANOTIFY=y</code> (File systems -> Filesystem wide access notification)
* <code>CONFIG_NETFILTER_XT_MARK=y</code> (Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> Core Netfilter Configuration -> Netfilter Xtables support (required for ip_tables) -> nfmark target and match support)
 
 
* <code>CONFIG_MEMCG=y</code> (General setup -> Control Group support -> Memory controller)
 
* <code>CONFIG_MEMCG=y</code> (General setup -> Control Group support -> Memory controller)
 
* <code>CONFIG_CGROUP_DEVICE=y</code> (General setup -> Control Group support -> Device controller)
 
* <code>CONFIG_CGROUP_DEVICE=y</code> (General setup -> Control Group support -> Device controller)
Line 31: Line 34:
 
* <code>CONFIG_IA32_EMULATION=y</code> (x86 only) (Executable file formats -> Emulations -> IA32 Emulation)
 
* <code>CONFIG_IA32_EMULATION=y</code> (x86 only) (Executable file formats -> Emulations -> IA32 Emulation)
  
For some [[usage scenarios]] there is an ability to track memory changes and produce [[incremental dumps]]. Need to enable the <code>CONFIG_MEM_SOFT_DIRTY=y</code> (optional) (Processor type and features -> Track memory changes).
+
For some [[usage scenarios]] there is an ability to track memory changes and produce [[incremental dumps]]. Need to enable the <code>CONFIG_MEM_SOFT_DIRTY=y</code> (optional) (Processor type and features -> Track memory changes). In order to enable [[lazy migration]], the [[userfaultfd]] system call is required <code>CONFIG_USERFAULTFD=y</code> (optional) (General setup -> Enable userfaultfd() system call).
  
 
In the beginning of the project we had our [[custom kernel]], which contained some experimental CRIU related patches. Nowadays this is almost not used.
 
In the beginning of the project we had our [[custom kernel]], which contained some experimental CRIU related patches. Nowadays this is almost not used.
  
 
[[Category: Building]]
 
[[Category: Building]]

Latest revision as of 08:55, 20 April 2021

Most likely the first thing to enable is the CONFIG_EXPERT=y (General setup -> Configure standard kernel features (expert users)) option, which on x86_64 depends on the CONFIG_EMBEDDED=y (General setup -> Embedded system) one (welcome to Kconfig reverse chains hell).

The following options must be enabled for CRIU to work:

  • General setup options
    • CONFIG_CHECKPOINT_RESTORE=y (Checkpoint/restore support)
    • CONFIG_NAMESPACES=y (Namespaces support)
    • CONFIG_UTS_NS=y (Namespaces support -> UTS namespace)
    • CONFIG_IPC_NS=y (Namespaces support -> IPC namespace)
    • CONFIG_SYSVIPC_SYSCTL=y
    • CONFIG_PID_NS=y (Namespaces support -> PID namespaces)
    • CONFIG_NET_NS=y (Namespaces support -> Network namespace)
    • CONFIG_FHANDLE=y (Open by fhandle syscalls)
    • CONFIG_EVENTFD=y (Enable eventfd() system call)
    • CONFIG_EPOLL=y (Enable eventpoll support)
  • Networking support -> Networking options options for sock-diag subsystem
    • CONFIG_UNIX_DIAG=y (Unix domain sockets -> UNIX: socket monitoring interface)
    • CONFIG_INET_DIAG=y (TCP/IP networking -> INET: socket monitoring interface)
    • CONFIG_INET_UDP_DIAG=y (TCP/IP networking -> INET: socket monitoring interface -> UDP: socket monitoring interface)
    • CONFIG_PACKET_DIAG=y (Packet socket -> Packet: sockets monitoring interface)
    • CONFIG_NETLINK_DIAG=y (Netlink socket -> Netlink: sockets monitoring interface)
  • CONFIG_NETFILTER_XT_MARK=y (Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> Core Netfilter Configuration -> Netfilter Xtables support (required for ip_tables) -> nfmark target and match support)
  • CONFIG_TUN=y (Networking support -> Universal TUN/TAP device driver support)


Other options not required by CRIU, but C/R supported (ZDTM test suite may fail without them):

  • CONFIG_INOTIFY_USER=y (File systems -> Inotify support for userspace)
  • CONFIG_FANOTIFY=y (File systems -> Filesystem wide access notification)
  • CONFIG_MEMCG=y (General setup -> Control Group support -> Memory controller)
  • CONFIG_CGROUP_DEVICE=y (General setup -> Control Group support -> Device controller)
  • CONFIG_MACVLAN=y (Device Drivers -> Network device support -> Network core driver support -> MAC-VLAN support)
  • CONFIG_BRIDGE=y (Networking support -> Networking options -> 802.1d Ethernet Bridging)
  • CONFIG_BINFMT_MISC=y (Userspace binary formats -> Kernel support for MISC binaries)
  • CONFIG_IA32_EMULATION=y (x86 only) (Executable file formats -> Emulations -> IA32 Emulation)

For some usage scenarios there is an ability to track memory changes and produce incremental dumps. Need to enable the CONFIG_MEM_SOFT_DIRTY=y (optional) (Processor type and features -> Track memory changes). In order to enable lazy migration, the userfaultfd system call is required CONFIG_USERFAULTFD=y (optional) (General setup -> Enable userfaultfd() system call).

In the beginning of the project we had our custom kernel, which contained some experimental CRIU related patches. Nowadays this is almost not used.