summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2022-10-18 20:34:53 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-10-18 20:35:34 +0300
commit46fc02f3932e37eb07ed7cd23ac96d464c6db55c (patch)
treeb60616a81b0bbc1012f678b783df7c2e07f72161 /poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch
parenta515de07dfa9eda7a303af296666e2572e581df7 (diff)
downloadopenbmc-honister.tar.xz
subtree updateshonister
meta-openembedded: 9a0caf5b09..0e6c34f82c: Martin Jansa (1): ostree: prevent ostree-native depending on target virtual/kernel to provide kernel-module-overlay Nicolas Dechesne (1): imlib2: update SRC_URI poky: eff78b3802..fd00d74f47: Alexandre Belloni (1): pseudo: Fix handling of absolute links Anuj Mittal (2): poky.conf: bump version for 3.4.4 release documentation: update for 3.4.4 release Bruce Ashfield (10): linux-yocto/5.10: update to v5.10.109 lttng-modules: update to 2.13.1 lttng-modules: support kernel 5.18+ linux-yocto/5.10: features/security: Move x86_64 configs to separate file linux-yocto/5.10: update to v5.10.110 linux-yocto/5.10: base: enable kernel crypto userspace API linux-yocto/5.10: update to v5.10.112 linux-yocto: enable powerpc debug fragment linux-yocto/5.10: update to v5.10.113 yocto-bsps: update to v5.10.113 Chen Qi (1): cases/buildepoxy.py: fix typo Davide Gardenal (1): rootfs-postcommands: fix symlinks where link and output path are equal Dmitry Baryshkov (2): linux-firmware: correct license for ar3k firmware linux-firmware: upgrade 20220411 -> 20220509 Felix Moessbauer (1): wic/plugins/rootfs: Fix permissions when splitting rootfs folders across partitions Joe Slater (1): unzip: fix CVE-2021-4217 Khem Raj (2): busybox: Use base_bindir instead of hardcoding /bin path linux-yocto: Enable powerpc-debug fragment for ppc64 LE Konrad Weihmann (1): gmp: add missing COPYINGv3 Martin Jansa (1): license_image.bbclass: close package.manifest file Max Krummenacher (2): perf: sort-pmuevents: don't drop elements perf: sort-pmuevents: allow for additional type qualifiers and storage class Michael Opdenacker (1): adding missing space in appends Ovidiu Panait (1): openssl: upgrade 1.1.1l -> 1.1.1n Paul Gortmaker (1): install/devshell: Introduce git intercept script due to fakeroot issues Peter Kjellerstedt (1): u-boot: Inherit pkgconfig Portia (1): volatile-binds: Change DefaultDependencies from false to no Rahul Kumar (1): neard: Switch SRC_URI to git repo Ralph Siemsen (1): xz: fix CVE-2022-1271 Ranjitsinh Rathod (1): openssl: Minor security upgrade 1.1.1n to 1.1.1o Richard Purdie (14): scripts/runqemu: Fix memory limits for qemux86-64 vim: Upgrade 8.2.4524 -> 8.2.4681 uninative: Upgrade to 3.6 with gcc 12 support tiff: Add marker for CVE-2022-1056 being fixed externalsrc/devtool: Fix to work with fixed export funcition flags handling libxshmfence: Correct LICENSE to HPND alsa-tools: Ensure we install correctly shadow-native: Simplify and fix syslog disable patch build-appliance-image: Update to honister head revision base: Avoid circular references to our own scripts base: Drop git intercept scripts: Make git intercept global scripts/git: Ensure we don't have circular references vim: Upgrade 8.2.4681 -> 8.2.4912 Ross Burton (4): bitbake: knotty: display active tasks when printing keepAlive() message bitbake: knotty: reduce keep-alive timeout from 5000s (83 minutes) to 10 minutes bitbake.conf: mark all directories as safe for git to read oeqa/selftest: add test for git working correctly inside pseudo wangmy (3): linux-firmware: upgrade 20220310 -> 20220411 lttng-modules: upgrade 2.13.1 -> 2.13.2 lttng-modules: upgrade 2.13.2 -> 2.13.3 zhengruoqin (1): wireless-regdb: upgrade 2022.02.18 -> 2022.04.08 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I0298ba1d7a4f4f77e0ebe24f18b3f8bdc326097b
Diffstat (limited to 'poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch')
-rw-r--r--poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch106
1 files changed, 106 insertions, 0 deletions
diff --git a/poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch b/poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch
new file mode 100644
index 0000000000..892d3f0d23
--- /dev/null
+++ b/poky/meta/recipes-kernel/lttng/lttng-modules/0010-fix-mm-compaction-cleanup-the-compaction-trace-event.patch
@@ -0,0 +1,106 @@
+From f9208dc00756dfa0a2f191799722030bdf3f793d Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Mon, 4 Apr 2022 15:14:01 -0400
+Subject: [PATCH 10/10] fix: mm: compaction: cleanup the compaction trace
+ events (v5.18)
+
+See upstream commit :
+
+ commit abd4349ff9b8d242376b67711254221f64f447c7
+ Author: Baolin Wang <baolin.wang@linux.alibaba.com>
+ Date: Tue Mar 22 14:45:56 2022 -0700
+
+ mm: compaction: cleanup the compaction trace events
+
+ As Steven suggested [1], we should access the pointers from the trace
+ event to avoid dereferencing them to the tracepoint function when the
+ tracepoint is disabled.
+
+ [1] https://lkml.org/lkml/2021/11/3/409
+
+Upstream-Status: Backport
+
+Change-Id: I6c08250df8596e8dbc76780ae5d95c899c12e6fe
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ include/instrumentation/events/compaction.h | 17 ++++++++++++++++-
+ src/probes/Kbuild | 17 ++++++++++++++++-
+ src/probes/lttng-probe-compaction.c | 5 +++++
+ 3 files changed, 37 insertions(+), 2 deletions(-)
+
+diff --git a/include/instrumentation/events/compaction.h b/include/instrumentation/events/compaction.h
+index 15964537..ecae39a8 100644
+--- a/include/instrumentation/events/compaction.h
++++ b/include/instrumentation/events/compaction.h
+@@ -97,7 +97,22 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template,
+
+ #endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,0,0) */
+
+-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
++LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages,
++
++ compaction_migratepages,
++
++ TP_PROTO(struct compact_control *cc,
++ unsigned int nr_succeeded),
++
++ TP_ARGS(cc, nr_succeeded),
++
++ TP_FIELDS(
++ ctf_integer(unsigned long, nr_migrated, nr_succeeded)
++ ctf_integer(unsigned long, nr_failed, cc->nr_migratepages - nr_succeeded)
++ )
++)
++#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,17,0))
+ LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages,
+
+ compaction_migratepages,
+diff --git a/src/probes/Kbuild b/src/probes/Kbuild
+index 8d6ff0f2..54784477 100644
+--- a/src/probes/Kbuild
++++ b/src/probes/Kbuild
+@@ -167,7 +167,22 @@ ifneq ($(CONFIG_BTRFS_FS),)
+ endif # $(wildcard $(btrfs_dep))
+ endif # CONFIG_BTRFS_FS
+
+-obj-$(CONFIG_LTTNG) += lttng-probe-compaction.o
++# A dependency on internal header 'mm/internal.h' was introduced in v5.18
++compaction_dep = $(srctree)/mm/internal.h
++compaction_dep_wildcard = $(wildcard $(compaction_dep))
++compaction_dep_check = $(shell \
++if [ \( $(VERSION) -ge 6 \
++ -o \( $(VERSION) -eq 5 -a $(PATCHLEVEL) -ge 18 \) \) -a \
++ -z "$(compaction_dep_wildcard)" ] ; then \
++ echo "warn" ; \
++else \
++ echo "ok" ; \
++fi ;)
++ifeq ($(compaction_dep_check),ok)
++ obj-$(CONFIG_LTTNG) += lttng-probe-compaction.o
++else
++ $(warning Files $(compaction_dep) not found. Probe "compaction" is disabled. Use full kernel source tree to enable it.)
++endif # $(wildcard $(compaction_dep))
+
+ ifneq ($(CONFIG_EXT4_FS),)
+ ext4_dep = $(srctree)/fs/ext4/*.h
+diff --git a/src/probes/lttng-probe-compaction.c b/src/probes/lttng-probe-compaction.c
+index f8ddf384..ffaf45f0 100644
+--- a/src/probes/lttng-probe-compaction.c
++++ b/src/probes/lttng-probe-compaction.c
+@@ -10,6 +10,11 @@
+
+ #include <linux/module.h>
+ #include <lttng/tracer.h>
++#include <lttng/kernel-version.h>
++
++#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
++#include "../mm/internal.h"
++#endif
+
+ /*
+ * Create the tracepoint static inlines from the kernel to validate that our
+--
+2.19.1
+