criu/test/jenkins/criu-fault.sh
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

50 lines
2.3 KiB
Bash
Executable file

#!/bin/bash
# Check known fault injections
set -e
source `dirname $0`/criu-lib.sh
prep
./test/zdtm.py run -t zdtm/static/env00 --fault 1 --report report -f h || fail
./test/zdtm.py run -t zdtm/static/unlink_fstat00 --fault 2 --report report -f h || fail
./test/zdtm.py run -t zdtm/static/maps00 --fault 3 --report report -f h || fail
# FIXME: fhandles looks broken on btrfs
findmnt --noheadings --target . | grep -q btrfs || NOBTRFS=$?
if [ $NOBTRFS -eq 1 ] ; then
./test/zdtm.py run -t zdtm/static/inotify_irmap --fault 128 --pre 2 -f uns || fail
fi
./test/zdtm.py run -t zdtm/static/env00 --fault 129 -f uns || fail
./test/zdtm.py run -t zdtm/static/vdso01 --fault 127 || fail
./test/zdtm.py run -t zdtm/static/vdso-proxy --fault 127 --iters 3 || fail
if [ "${COMPAT_TEST}" != "y" ] ; then
./test/zdtm.py run -t zdtm/static/vdso01 --fault 133 -f h || fail
fi
./test/zdtm.py run -t zdtm/static/mntns_ghost --fault 2 --report report || fail
./test/zdtm.py run -t zdtm/static/mntns_ghost --fault 4 --report report || fail
./test/zdtm.py run -t zdtm/static/mntns_ghost --fault 6 --report report || fail
./test/zdtm.py run -t zdtm/static/mntns_link_remap --fault 6 --report report || fail
./test/zdtm.py run -t zdtm/static/unlink_fstat03 --fault 6 --report report || fail
./test/zdtm.py run -t zdtm/static/env00 --fault 5 --report report || fail
./test/zdtm.py run -t zdtm/static/maps04 --fault 131 --report report --pre 2:1 || fail
./test/zdtm.py run -t zdtm/transition/maps008 --fault 131 --report report --pre 2:1 || fail
./test/zdtm.py run -t zdtm/static/maps01 --fault 132 -f h || fail
# 134 is corrupting extended registers set, should run in a sub-thread (fpu03)
# without restore (that will check if parasite corrupts extended registers)
./test/zdtm.py run -t zdtm/static/fpu03 --fault 134 -f h --norst || fail
# also check for the main thread corruption
./test/zdtm.py run -t zdtm/static/fpu00 --fault 134 -f h --norst || fail
# check set_compel_interrupt_only_mode
./test/zdtm.py run -t zdtm/static/env00 --freezecg zdtm:t --fault 137
./test/zdtm.py run -t zdtm/static/env00 --freezecg zdtm:t --fault 137 --norst
# check set_compel_interrupt_only_mode when test cgroup is frozen
./test/zdtm.py run -t zdtm/static/env00 --freezecg zdtm:f --fault 137
if ./test/zdtm.py run -t zdtm/static/vfork00 --fault 136 --report report -f h ; then
fail
fi