linux-next: manual merge of the ftrace tree with Linus' tree
Hi all,
Today's linux-next merge of the ftrace tree got a conflict in:
kernel/trace/ring_buffer.c
between commit:
68e10d5ff512 ("ring-buffer: Always check to put back before stamp when crossing pages")
from Linus' tree and commit:
5b7be9c709e1 ("ring-buffer: Add test to validate the time stamp deltas")
from the ftrace tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 29 lines
Cheers,
Stephen Rothwell
diff --cc kernel/trace/ring_buffer.c
index a6268e09160a,7cd888ee9ac7..000000000000
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@@ -3234,12 -3391,16 +3391,14 @@@ __rb_reserve_next(struct ring_buffer_pe
/* See if we shot pass the end of this buffer page */
if (unlikely(write > BUF_PAGE_SIZE)) {
- if (tail != w) {
- /* before and after may now different, fix it up*/
- b_ok = rb_time_read(&cpu_buffer->before_stamp, &info->before);
- a_ok = rb_time_read(&cpu_buffer->write_stamp, &info->after);
- if (a_ok && b_ok && info->before != info->after)
- (void)rb_time_cmpxchg(&cpu_buffer->before_stamp,
- info->before, info->after);
- }
+ /* before and after may now different, fix it up*/
+ b_ok = rb_time_read(&cpu_buffer->before_stamp, &info->before);
+ a_ok = rb_time_read(&cpu_buffer->write_stamp, &info->after);
+ if (a_ok && b_ok && info->before != info->after)
+ (void)rb_time_cmpxchg(&cpu_buffer->before_stamp,
+ info->before, info->after);
+ if (a_ok && b_ok)
+ check_buffer(cpu_buffer, info, CHECK_FULL_PAGE);
return rb_move_tail(cpu_buffer, tail, info);
}Hi all,
Quoted 43 lines · On Tue, 8 Dec 2020 16:02:22 +1100 Stephen Rothwell <[email protected]> wrote:
Today's linux-next merge of the ftrace tree got a conflict in:
kernel/trace/ring_buffer.cbetween commit:
68e10d5ff512("ring-buffer: Always check to put back before stamp when crossing pages")from Linus' tree and commit:
5b7be9c709e1("ring-buffer: Add test to validate the time stamp deltas")from the ftrace tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 2 lines
Cheers, Stephen Rothwellkernel/trace/ring_buffer.c +0
-0@@@ -3234,12 -3391,16 +3391,14 @@@ __rb_reserve_next(struct ring_buffer_pe/* See if we shot pass the end of this buffer page */ if (unlikely (write >BUF_PAGE_SIZE )) { - if (tail != w) { -/* before and after may now different, fix it up*/ - b_ok =rb_time_read (&cpu_buffer->before_stamp, &info->before); - a_ok =rb_time_read (&cpu_buffer->write_stamp, &info->after); - if (a_ok && b_ok && info->before != info->after) - (void )rb_time_cmpxchg (&cpu_buffer->before_stamp, - info->before, info->after); - }
kernel/trace/ring_buffer.c
Quoted 10 lines
kernel/trace/ring_buffer.c +2
-0+/* before and after may now different, fix it up*/ + b_ok =rb_time_read (&cpu_buffer->before_stamp, &info->before); + a_ok =rb_time_read (&cpu_buffer->write_stamp, &info->after); + if (a_ok && b_ok && info->before != info->after) + (void )rb_time_cmpxchg (&cpu_buffer->before_stamp, + info->before, info->after); +if (a_ok && b_ok) +check_buffer (cpu_buffer, info,CHECK_FULL_PAGE );return rb_move_tail (cpu_buffer, tail, info); }
Just a reminder that this conflict still exists.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 7 lines · On Tue, 15 Dec 2020 07:37:25 +1100 Stephen Rothwell <[email protected]>…
Review
Quoted 4 lines
(quoted diff) +1
-0+ check_buffer(cpu_buffer, info, CHECK_FULL_PAGE); return rb_move_tail(cpu_buffer, tail, info); }Just a reminder that this conflict still exists.
Thanks for the reminder. Both updates were done by me, and I assumed that the fix was trivial enough for Linus to figure out.
But I'll try to remember to include a note about it before sending to Linus.
Cheers,
-- Steve