From 1e0d296bda4fdeb2eb2bf4ad439ece0325c1a944 Mon Sep 17 00:00:00 2001 From: Vaibhav Jindal Date: Mon, 3 Aug 2026 14:36:57 +0530 Subject: [PATCH] hackbench: add Linux scheduler benchmark recipe Add a recipe for hackbench, a Linux scheduler benchmark used to measure scheduling and inter-process communication performance under various workloads. The recipe builds and installs the hackbench executable with NUMA support enabled for use in performance evaluation and regression testing. Signed-off-by: Vaibhav Jindal Signed-off-by: Khem Raj --- .../hackbench/hackbench_git.bb | 24 +++++++++++++++++++ .../packagegroups/packagegroup-meta-oe.bb | 1 + 2 files changed, 25 insertions(+) create mode 100644 meta-oe/recipes-benchmark/hackbench/hackbench_git.bb diff --git a/meta-oe/recipes-benchmark/hackbench/hackbench_git.bb b/meta-oe/recipes-benchmark/hackbench/hackbench_git.bb new file mode 100644 index 0000000000..109e816cce --- /dev/null +++ b/meta-oe/recipes-benchmark/hackbench/hackbench_git.bb @@ -0,0 +1,24 @@ +SUMMARY = "Linux kernel scheduler benchmark" +DESCRIPTION = "Hackbench is a benchmark for measuring Linux kernel scheduler performance. It creates groups of processes or threads that communicate via pipes or sockets and measures the time taken to complete the communication." +HOMEPAGE = "https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +SRC_URI = "git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git;protocol=https;branch=main" +SRCREV = "d232f528fd131b7d840e79a3756d1dbdaa9b1b60" + +DEPENDS = "numactl" + +# Filter out unsupported compiler flags +CFLAGS:remove = "-fcanon-prefix-map" + +do_configure[noexec] = "1" + +do_compile() { + oe_runmake NUMA=1 CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" hackbench +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${B}/hackbench ${D}${bindir}/hackbench +} diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb index 084d5a201f..0320021d65 100644 --- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb @@ -58,6 +58,7 @@ RDEPENDS:packagegroup-meta-oe-benchmarks = "\ dhrystone \ fio \ ${@bb.utils.contains("DISTRO_FEATURES", "x11 wayland opengl", "glmark2", "", d)} \ + hackbench \ iozone3 \ iperf2 \ iperf3 \