]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
25b0a57bc62788f0c70aaf4a8980adf2f7d46aeb
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From 66d0869cf54ed79a33345f537dce2f7840e279f0 Mon Sep 17 00:00:00 2001
2 From: Bruce Ashfield <bruce.ashfield@gmail.com>
3 Date: Tue, 29 Sep 2020 10:28:20 -0400
4 Subject: [PATCH] lttng-modules: backport writeback.h changes from 2.12.x to
5 fix kernel 5.4.62+
6
7 Backporting the kernel version changes for writeback.h to fix
8 compilation against kernel stable versions 5.4.62+
9
10 This is a combination of upstream commits:
11
12 87b2aff [fix: writeback: Fix sync livelock due to b_dirty_time processing (v5.9)]
13 b74b25f [fix: version ranges for ext4_discard_preallocations and writeback_queue_io
14
15 Upstream-status: Backport
16
17 Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
18 ---
19 .../events/lttng-module/writeback.h | 48 +++++++++++++------
20 1 file changed, 33 insertions(+), 15 deletions(-)
21
22 diff --git a/instrumentation/events/lttng-module/writeback.h b/instrumentation/events/lttng-module/writeback.h
23 index 3327a0f..8d2250e 100644
24 --- a/instrumentation/events/lttng-module/writeback.h
25 +++ b/instrumentation/events/lttng-module/writeback.h
26 @@ -372,34 +372,55 @@ LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_wait, writeback_wbc_balanc
27 #endif
28 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writepage, writeback_wbc_writepage)
29
30 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
31 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) || \
32 + LTTNG_KERNEL_RANGE(5,8,6, 5,9,0) || \
33 + LTTNG_KERNEL_RANGE(5,4,62, 5,5,0) || \
34 + LTTNG_KERNEL_RANGE(4,19,143, 4,20,0) || \
35 + LTTNG_KERNEL_RANGE(4,14,196, 4,15,0) || \
36 + LTTNG_KERNEL_RANGE(4,9,235, 4,10,0) || \
37 + LTTNG_KERNEL_RANGE(4,4,235, 4,5,0) || \
38 + LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,119, 4,16,0,0))
39 +LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
40 + TP_PROTO(struct bdi_writeback *wb,
41 + struct wb_writeback_work *work,
42 + unsigned long dirtied_before,
43 + int moved),
44 + TP_ARGS(wb, work, dirtied_before, moved),
45 + TP_FIELDS(
46 + ctf_array_text(char, name, dev_name(wb->bdi->dev), 32)
47 + ctf_integer(unsigned long, older, dirtied_before)
48 + ctf_integer(int, moved, moved)
49 + )
50 +)
51 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
52 LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
53 TP_PROTO(struct bdi_writeback *wb,
54 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
55 struct wb_writeback_work *work,
56 -#else
57 - unsigned long *older_than_this,
58 -#endif
59 int moved),
60 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
61 TP_ARGS(wb, work, moved),
62 -#else
63 + TP_FIELDS(
64 + ctf_array_text(char, name, dev_name(wb->bdi->dev), 32)
65 + ctf_integer(int, moved, moved)
66 + )
67 +)
68 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
69 +LTTNG_TRACEPOINT_EVENT(writeback_queue_io,
70 + TP_PROTO(struct bdi_writeback *wb,
71 + unsigned long *older_than_this,
72 + int moved),
73 TP_ARGS(wb, older_than_this, moved),
74 -#endif
75 TP_FIELDS(
76 ctf_array_text(char, name, dev_name(wb->bdi->dev), 32)
77 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
78 -#else
79 ctf_integer(unsigned long, older,
80 older_than_this ? *older_than_this : 0)
81 ctf_integer(long, age,
82 older_than_this ?
83 (jiffies - *older_than_this) * 1000 / HZ
84 : -1)
85 -#endif
86 ctf_integer(int, moved, moved)
87 )
88 )
89 +#endif
90
91 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
92 LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
93 @@ -425,7 +446,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
94 ctf_integer(unsigned long, dirty_limit, global_dirty_limit)
95 )
96 )
97 -#else
98 +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
99 LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
100
101 writeback_global_dirty_state,
102 @@ -450,7 +471,6 @@ LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state,
103 )
104 )
105 #endif
106 -#endif
107
108 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
109
110 @@ -661,7 +681,6 @@ LTTNG_TRACEPOINT_EVENT(writeback_sb_inodes_requeue,
111 )
112 #endif
113
114 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
115 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_congest_waited_template,
116
117 TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),
118 @@ -687,7 +706,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_congest_waited_template, writeback_wai
119
120 TP_ARGS(usec_timeout, usec_delayed)
121 )
122 -#endif
123
124 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
125 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_single_inode_template,
126 --
127 2.25.1
128