Skip to contentSkip to conversation

lttng-modules: fix v6.8+ build

PATCH New [email protected] 1 participant 2 messages Jan 25, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 lttng-modules: fix v6.8+ build

From: Bruce Ashfield <[email protected]>

linux-yocto-dev is updating to 6.8 and lttng-modules needs to be updated to account for upsream kernel fixes.

These patches are all grabbed from the lttng review gerrit and backported to lttng-modules 2.13.0.

---
 ...t_runtime-changed-in-linux-6.8.0-rc1.patch |  70 ++++++++++
 ...mer_start-changed-in-linux-6.8.0-rc1.patch | 100 ++++++++++++++
 ...-strlcopy-removed-in-linux-6.8.0-rc1.patch |  46 +++++++
 ...tracepoints-changed-in-linux-6.8.0-r.patch | 124 ++++++++++++++++++
 ...tent-flags-and-compress_type-changed.patch |  88 +++++++++++++
 .../lttng/lttng-modules_2.13.10.bb            |   7 +-
 6 files changed, 434 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0001-Fix-sched_stat_runtime-changed-in-linux-6.8.0-rc1.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0003-Fix-strlcopy-removed-in-linux-6.8.0-rc1.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0004-Fix-btrfs_chunk-tracepoints-changed-in-linux-6.8.0-r.patch
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch
meta/recipes-kernel/lttng/lttng-modules/0001-Fix-sched_stat_runtime-changed-in-linux-6.8.0-rc1.patch new file +70 -0
new file mode 100644
index 0000000000..a0d932c7b7
@@ -0,0 +1,70 @@
+From 9e59c2f6387aeb832ae3af3095f987529722e08f Mon Sep 17 00:00:00 2001
+From: Kienan Stewart <[email protected]>
+Date: Mon, 22 Jan 2024 11:10:37 -0500
+Subject: [PATCH 1/5] Fix: sched_stat_runtime changed in linux 6.8.0-rc1
+
+See upstream commit:
+
+    commit 5fe6ec8f6ab549b6422e41551abb51802bd48bc7
+    Author: Peter Zijlstra <[email protected]>
+    Date:   Mon Nov 6 13:41:43 2023 +0100
+
+        sched: Remove vruntime from trace_sched_stat_runtime()
+
+        Tracing the runtime delta makes sense, observer can sum over time.
+        Tracing the absolute vruntime makes less sense, inconsistent:
+        absolute-vs-delta, but also vruntime delta can be computed from
+        runtime delta.
+
+        Removing the vruntime thing also makes the two tracepoint sites
+        identical, allowing to unify the code in a later patch.
+
+Upstream-Status: Backport [Uhttps://review.lttng.org/c/lttng-modules/+/11700]
+
+Change-Id: I24ebb4e06dbb646a1af75ac62b74f3821ff197de
+Signed-off-by: Kienan Stewart <[email protected]>
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ include/instrumentation/events/sched.h | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/include/instrumentation/events/sched.h b/include/instrumentation/events/sched.h
+index 066a0f8..24cf37c 100644
+--- a/include/instrumentation/events/sched.h
++++ b/include/instrumentation/events/sched.h
+@@ -646,6 +646,24 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_stat_template, sched_stat_blocked,
+ 	     TP_ARGS(tsk, delay))
+ #endif
+ 
++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,8,0))
++/*
++ * Tracepoint for accounting runtime (time the task is executing
++ * on a CPU).
++ */
++LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
++
++	TP_PROTO(struct task_struct *tsk, u64 runtime),
++
++	TP_ARGS(tsk, runtime),
++
++	TP_FIELDS(
++		ctf_array_text(char, comm, tsk->comm, TASK_COMM_LEN)
++		ctf_integer(pid_t, tid, tsk->pid)
++		ctf_integer(u64, runtime, runtime)
++	)
++)
++#else
+ /*
+  * Tracepoint for accounting runtime (time the task is executing
+  * on a CPU).
+@@ -663,6 +681,7 @@ LTTNG_TRACEPOINT_EVENT(sched_stat_runtime,
+ 		ctf_integer(u64, vruntime, vruntime)
+ 	)
+ )
++#endif
+ 
+ #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,12,0) || \
+ 	LTTNG_RT_KERNEL_RANGE(4,9,27,18, 4,10,0,0) || \
+-- 
+2.39.2
+
meta/recipes-kernel/lttng/lttng-modules/0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch new file +100 -0

100 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0003-Fix-strlcopy-removed-in-linux-6.8.0-rc1.patch new file +46 -0

46 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0004-Fix-btrfs_chunk-tracepoints-changed-in-linux-6.8.0-r.patch new file +124 -0

124 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules/0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch new file +88 -0

88 lines not on this page · raw message

meta/recipes-kernel/lttng/lttng-modules_2.13.10.bb +6 -1
index a7e3096c6a..3dddbf4ffd 100644
@@ -13,7 +13,12 @@ SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://0001-fix-phys_proc_id-and-cpu_core_id-moved-in-linux-6.7..patch \
            file://0002-fix-mm-vmscan-signatures-changed-in-linux-6.7.0-rc1.patch \
            file://0001-wrapper-fdtable-adjust-fd-lookup-to-v6.7.patch \
-           "
+           file://0001-Fix-sched_stat_runtime-changed-in-linux-6.8.0-rc1.patch \
+           file://0002-Fix-timer_start-changed-in-linux-6.8.0-rc1.patch \
+           file://0003-Fix-strlcopy-removed-in-linux-6.8.0-rc1.patch \
+           file://0004-Fix-btrfs_chunk-tracepoints-changed-in-linux-6.8.0-r.patch \
+           file://0005-Fix-btrfs_get_extent-flags-and-compress_type-changed.patch \
+        "
 
 # Use :append here so that the patch is applied also when using devupstream
 SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/2 linux-yocto-dev: update to v6.8

From: Bruce Ashfield <[email protected]>

-rc1 is available, so we bump our -dev kernel to track.

---
 meta/recipes-kernel/linux/linux-yocto-dev.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-kernel/linux/linux-yocto-dev.bb +2 -2
index a85f85e4c3..c91aa073e8 100644
@@ -14,7 +14,7 @@ require recipes-kernel/linux/linux-yocto.inc
 # provide this .inc to set specific revisions
 include recipes-kernel/linux/linux-yocto-dev-revisions.inc
 
-KBRANCH = "v6.7/standard/base"
+KBRANCH = "v6.8/standard/base"
 KMETA = "kernel-meta"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name=machine;protocol=https \
@@ -28,7 +28,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name
 SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
 SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
 
-LINUX_VERSION ?= "6.7"
+LINUX_VERSION ?= "6.8"
 LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
 PV = "${LINUX_VERSION}+git"
 
Signature · 1 line
2.39.2