]> git.pld-linux.org Git - packages/lttng-modules.git/commitdiff
- build and run-time fixes for current kernels auto/th/lttng-modules-2.6.0-2
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 22 Mar 2015 19:57:44 +0000 (20:57 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 22 Mar 2015 19:57:44 +0000 (20:57 +0100)
- rel 2

kernel-updates.patch [new file with mode: 0644]
lttng-modules.spec

diff --git a/kernel-updates.patch b/kernel-updates.patch
new file mode 100644 (file)
index 0000000..5c61002
--- /dev/null
@@ -0,0 +1,155 @@
+From 8b83133133cfa305193f093ceba28a95d31381eb Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Thu, 19 Mar 2015 12:55:48 -0400
+Subject: [PATCH] Fix: kmem instrumentation: mm_page_alloc extfrag
+ change_ownership field
+
+Linux kernel 3.12.30 and onward changes the parameter received by this
+callback. It's the same type, but the meaning differs. This is why it
+did compile fine, but the data gathered did not really represent
+change_ownership.
+
+This change has been introduced in the Linux kernel by this commit:
+
+commit 52c8f6a5aeb0bdd396849ecaa72d96f8175528f5
+Author: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+Date:   Tue Nov 12 15:08:19 2013 -0800
+
+    mm: get rid of unnecessary overhead of trace_mm_page_alloc_extfrag()
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ instrumentation/events/lttng-module/kmem.h | 44 +++++++++++++++++++++++++++++-
+ 1 file changed, 43 insertions(+), 1 deletion(-)
+
+diff --git a/instrumentation/events/lttng-module/kmem.h b/instrumentation/events/lttng-module/kmem.h
+index 203a19c..cde2a20 100644
+--- a/instrumentation/events/lttng-module/kmem.h
++++ b/instrumentation/events/lttng-module/kmem.h
+@@ -286,7 +286,49 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm_page, mm_page_pcpu_drain,
+               __entry->order, __entry->migratetype)
+ )
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30))
++
++LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
++
++      TP_PROTO(struct page *page,
++              int alloc_order, int fallback_order,
++              int alloc_migratetype, int fallback_migratetype, int new_migratetype),
++
++      TP_ARGS(page,
++              alloc_order, fallback_order,
++              alloc_migratetype, fallback_migratetype, new_migratetype),
++
++      TP_STRUCT__entry(
++              __field_hex(    struct page *,  page                    )
++              __field(        int,            alloc_order             )
++              __field(        int,            fallback_order          )
++              __field(        int,            alloc_migratetype       )
++              __field(        int,            fallback_migratetype    )
++              __field(        int,            change_ownership        )
++      ),
++
++      TP_fast_assign(
++              tp_assign(page, page)
++              tp_assign(alloc_order, alloc_order)
++              tp_assign(fallback_order, fallback_order)
++              tp_assign(alloc_migratetype, alloc_migratetype)
++              tp_assign(fallback_migratetype, fallback_migratetype)
++              tp_assign(change_ownership, (new_migratetype == alloc_migratetype))
++      ),
++
++      TP_printk("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d",
++              __entry->page,
++              page_to_pfn(__entry->page),
++              __entry->alloc_order,
++              __entry->fallback_order,
++              pageblock_order,
++              __entry->alloc_migratetype,
++              __entry->fallback_migratetype,
++              __entry->fallback_order < pageblock_order,
++              __entry->change_ownership)
++)
++
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+ LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
+From 2cf0c2ca8759ed6103b5aab149efea34e6986818 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Thu, 19 Mar 2015 13:02:38 -0400
+Subject: [PATCH] Fix: kmem instrumentation update for mm_page_alloc_extfrag
+ kernel 3.19.2+
+
+This commit introduces an API change for mm_page_alloc_extfrag
+instrumentation:
+
+commit cdf476685b5c9dcd20f0305791bd60212cace25d
+Author: Vlastimil Babka <vbabka@suse.cz>
+Date:   Wed Feb 11 15:28:15 2015 -0800
+
+    mm: when stealing freepages, also take pages created by splitting buddy page
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+---
+ instrumentation/events/lttng-module/kmem.h | 45 +++++++++++++++++++++++++++++-
+ 1 file changed, 44 insertions(+), 1 deletion(-)
+
+diff --git a/instrumentation/events/lttng-module/kmem.h b/instrumentation/events/lttng-module/kmem.h
+index cde2a20..3782ac6 100644
+--- a/instrumentation/events/lttng-module/kmem.h
++++ b/instrumentation/events/lttng-module/kmem.h
+@@ -286,7 +286,50 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm_page, mm_page_pcpu_drain,
+               __entry->order, __entry->migratetype)
+ )
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30))
++#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2)) || ((LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,36)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0))))
++
++LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
++
++      TP_PROTO(struct page *page,
++              int alloc_order, int fallback_order,
++              int alloc_migratetype, int fallback_migratetype),
++
++      TP_ARGS(page,
++              alloc_order, fallback_order,
++              alloc_migratetype, fallback_migratetype),
++
++      TP_STRUCT__entry(
++              __field_hex(    struct page *,  page                    )
++              __field(        int,            alloc_order             )
++              __field(        int,            fallback_order          )
++              __field(        int,            alloc_migratetype       )
++              __field(        int,            fallback_migratetype    )
++              __field(        int,            change_ownership        )
++      ),
++
++      TP_fast_assign(
++              tp_assign(page, page)
++              tp_assign(alloc_order, alloc_order)
++              tp_assign(fallback_order, fallback_order)
++              tp_assign(alloc_migratetype, alloc_migratetype)
++              tp_assign(fallback_migratetype, fallback_migratetype)
++              tp_assign(change_ownership,
++                      (alloc_migratetype == get_pageblock_migratetype(page)))
++      ),
++
++      TP_printk("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d",
++              __entry->page,
++              page_to_pfn(__entry->page),
++              __entry->alloc_order,
++              __entry->fallback_order,
++              pageblock_order,
++              __entry->alloc_migratetype,
++              __entry->fallback_migratetype,
++              __entry->fallback_order < pageblock_order,
++              __entry->change_ownership)
++)
++
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,30))
+ LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
index 1188cc3142878af2f72e5b501a852b326f6b2b9d..414227fef735c162966658f12085185ee697c6ff 100644 (file)
@@ -6,7 +6,7 @@
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
 
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
 
-%define                rel     1
+%define                rel     2
 %define                pname   lttng-modules
 Summary:       LTTng 2.x kernel modules
 Summary(pl.UTF-8):     Moduły jądra LTTng 2.x
 %define                pname   lttng-modules
 Summary:       LTTng 2.x kernel modules
 Summary(pl.UTF-8):     Moduły jądra LTTng 2.x
@@ -18,6 +18,7 @@ Group:                Base/Kernel
 Source0:       http://lttng.org/files/lttng-modules/%{pname}-%{version}.tar.bz2
 # Source0-md5: a058ab037daaca293a54934d7b9f9c98
 Patch0:                build.patch
 Source0:       http://lttng.org/files/lttng-modules/%{pname}-%{version}.tar.bz2
 # Source0-md5: a058ab037daaca293a54934d7b9f9c98
 Patch0:                build.patch
+Patch1:                kernel-updates.patch
 URL:           http://lttng.org/
 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.38}
 %{?with_allprobes:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-source >= 3:2.6.38}}
 URL:           http://lttng.org/
 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.38}
 %{?with_allprobes:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-source >= 3:2.6.38}}
@@ -85,6 +86,7 @@ p=`pwd`\
 %prep
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
 %prep
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{expand:%build_kernel_packages}
 
 %build
 %{expand:%build_kernel_packages}
This page took 0.096328 seconds and 4 git commands to generate.