diff --git a/test/benchmark/common/bench_runner.sh b/test/benchmark/common/bench_runner.sh index 05b3961f..82393a5a 100755 --- a/test/benchmark/common/bench_runner.sh +++ b/test/benchmark/common/bench_runner.sh @@ -45,12 +45,6 @@ prepare_system() { if [ "$SYSTEM" = "linux" ]; then # Mount necessary fs mount -t devtmpfs devtmpfs /dev - # Add drivers - depmod - modprobe failover - modprobe net_failover - modprobe virtio_net - modprobe virtio_blk # Enable network ip link set lo up ip link set eth0 up diff --git a/test/benchmark/common/prepare_host.sh b/test/benchmark/common/prepare_host.sh index eab18f05..4be7a9c6 100644 --- a/test/benchmark/common/prepare_host.sh +++ b/test/benchmark/common/prepare_host.sh @@ -10,7 +10,7 @@ BENCHMARK_DIR="${BENCHMARK_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &>/dev/ # Dependencies for Linux LINUX_DEPENDENCIES_DIR="/opt/linux_binary_cache" LINUX_KERNEL="${LINUX_DEPENDENCIES_DIR}/vmlinuz" -LINUX_KERNEL_VERSION="5.15.0-105-generic" +LINUX_KERNEL_VERSION="5.15.0-105" LINUX_MODULES_DIR="${BENCHMARK_DIR}/../build/initramfs/lib/modules/${LINUX_KERNEL_VERSION}/kernel" WGET_SCRIPT="${BENCHMARK_DIR}/../../tools/atomic_wget.sh" @@ -21,11 +21,7 @@ prepare_libs() { # Array of files to download and their URLs declare -A files=( - ["${LINUX_KERNEL}"]="https://raw.githubusercontent.com/asterinas/linux_binary_cache/8a5b6fd/vmlinuz-${LINUX_KERNEL_VERSION}" - ["${LINUX_DEPENDENCIES_DIR}/virtio_blk.ko"]="https://raw.githubusercontent.com/asterinas/linux_binary_cache/8a5b6fd/kernel/drivers/block/virtio_blk.ko" - ["${LINUX_DEPENDENCIES_DIR}/virtio_net.ko"]="https://raw.githubusercontent.com/asterinas/linux_binary_cache/8a5b6fd/kernel/drivers/net/virtio_net.ko" - ["${LINUX_DEPENDENCIES_DIR}/net_failover.ko"]="https://raw.githubusercontent.com/asterinas/linux_binary_cache/8a5b6fd/kernel/drivers/net/net_failover.ko" - ["${LINUX_DEPENDENCIES_DIR}/failover.ko"]="https://raw.githubusercontent.com/asterinas/linux_binary_cache/8a5b6fd/kernel/net/core/failover.ko" + ["${LINUX_KERNEL}"]="https://raw.githubusercontent.com/asterinas/linux_binary_cache/14598b6/vmlinuz-${LINUX_KERNEL_VERSION}" ) # Download files if they don't exist @@ -38,24 +34,6 @@ prepare_libs() { } fi done - - # Copy the kernel modules to the initramfs directory - if [ ! -f "${LINUX_MODULES_DIR}/drivers/block/virtio_blk.ko" ]; then - mkdir -p "${LINUX_MODULES_DIR}/drivers/block" - mkdir -p "${LINUX_MODULES_DIR}/drivers/net" - mkdir -p "${LINUX_MODULES_DIR}/net/core" - - declare -A modules=( - ["${LINUX_DEPENDENCIES_DIR}/virtio_blk.ko"]="${LINUX_MODULES_DIR}/drivers/block/virtio_blk.ko" - ["${LINUX_DEPENDENCIES_DIR}/virtio_net.ko"]="${LINUX_MODULES_DIR}/drivers/net/virtio_net.ko" - ["${LINUX_DEPENDENCIES_DIR}/net_failover.ko"]="${LINUX_MODULES_DIR}/drivers/net/net_failover.ko" - ["${LINUX_DEPENDENCIES_DIR}/failover.ko"]="${LINUX_MODULES_DIR}/net/core/failover.ko" - ) - - for src in "${!modules[@]}"; do - sudo cp "$src" "${modules[$src]}" - done - fi } # Prepare fs for Linux diff --git a/tools/docker/Dockerfile.jinja b/tools/docker/Dockerfile.jinja index 0384ba22..61e09c0e 100644 --- a/tools/docker/Dockerfile.jinja +++ b/tools/docker/Dockerfile.jinja @@ -30,16 +30,8 @@ RUN apt update && apt-get install -y --no-install-recommends \ WORKDIR /opt/linux_binary_cache RUN wget https://raw.githubusercontent.com/asterinas/linux_vdso/2a6d2db/vdso64.so -O vdso64.so -RUN wget https://raw.githubusercontent.com/asterinas/linux_binary_cache/8a5b6fd/vmlinuz-5.15.0-105-generic \ +RUN wget https://raw.githubusercontent.com/asterinas/linux_binary_cache/14598b6/vmlinuz-5.15.0-105 \ -O vmlinuz -RUN wget https://raw.githubusercontent.com/asterinas/linux_binary_cache/8a5b6fd/kernel/drivers/block/virtio_blk.ko \ - -O virtio_blk.ko -RUN wget https://raw.githubusercontent.com/asterinas/linux_binary_cache/8a5b6fd/kernel/drivers/net/net_failover.ko \ - -O net_failover.ko -RUN wget https://raw.githubusercontent.com/asterinas/linux_binary_cache/8a5b6fd/kernel/drivers/net/virtio_net.ko \ - -O virtio_net.ko -RUN wget https://raw.githubusercontent.com/asterinas/linux_binary_cache/8a5b6fd/kernel/net/core/failover.ko \ - -O failover.ko #= Build benchmark =========================================================