criu/compel/include/rpc-pie-priv.h
Andrei Vagin 7daebbe469 compel: remove hardware breakpoint usage
Hardware breakpoints were originally intended to speed up the resume process
by stopping the process at a specific point in the pie code. However, it
turned out that they don't provide a significant speedup and, in some cases,
can even slow it down. This is especially critical for hosts with a large
number of CPUs.

Hardware Breakpoint Restore Performance Benchmark
==================================================

System: Linux 6.17.0-1007-gcp x86_64
CPU:    INTEL(R) XEON(R) PLATINUM 8581C CPU @ 2.10GHz
Virt:   google
CRIU:   Version: 4.2
Iterations per data point: 5

Threads         With BP (us) Without BP (us)     Diff (%)
--------        ------------ ---------------     --------
>>> Benchmarking with 1 thread(s)...
1                        391             326        19.9%
>>> Benchmarking with 10 thread(s)...
10                      1098             695        58.0%
>>> Benchmarking with 50 thread(s)...
50                      3772            2344        60.9%
>>> Benchmarking with 100 thread(s)...
100                     6740            4504        49.6%
>>> Benchmarking with 500 thread(s)...
500                    31382           19982        57.1%
>>> Benchmarking with 1000 thread(s)...
1000                   58617           40568        44.5%

Notes:
  'With BP'    = hardware breakpoints enabled (current default)
  'Without BP' = CRIU_FAULT=130 (FI_NO_BREAKPOINTS, uses PTRACE_SYSCALL)
  Positive diff% means breakpoints are slower

Signed-off-by: Andrei Vagin <avagin@google.com>
2026-03-08 23:01:54 -07:00

55 lines
1.1 KiB
C

#ifndef __COMPEL_RPC_H__
#define __COMPEL_RPC_H__
struct ctl_msg {
uint32_t cmd; /* command itself */
uint32_t ack; /* ack on command */
int32_t err; /* error code on reply */
};
#define ctl_msg_cmd(_cmd) \
(struct ctl_msg) \
{ \
.cmd = _cmd, \
}
#define ctl_msg_ack(_cmd, _err) \
(struct ctl_msg) \
{ \
.cmd = _cmd, .ack = _cmd, .err = _err, \
}
/*
* NOTE: each command's args should be arch-independed sized.
* If you want to use one of the standard types, declare
* alternative type for compatible tasks in parasite-compat.h
*/
enum {
PARASITE_CMD_IDLE = 0,
PARASITE_CMD_ACK,
PARASITE_CMD_INIT_DAEMON,
/*
* This must be greater than INITs.
*/
PARASITE_CMD_FINI,
__PARASITE_END_CMDS,
};
struct parasite_init_args {
int32_t h_addr_len;
struct sockaddr_un h_addr;
int32_t log_level;
uint64_t sigframe; /* pointer to sigframe */
futex_t daemon_connected;
#ifdef ARCH_HAS_LONG_PAGES
uint32_t page_size;
#endif
};
struct parasite_unmap_args {
uint64_t parasite_start;
uint64_t parasite_len;
};
#endif