Re: [PATCH] ring-buffer: Fix slowpath of interrupted event

2023-12-19 Thread Google
On Tue, 19 Dec 2023 10:10:27 -0500 Steven Rostedt wrote: > On Tue, 19 Dec 2023 23:37:10 +0900 > Masami Hiramatsu (Google) wrote: > > > Yeah the above works, but my question is, do we really need this > > really slow path? I mean; > > > > > if (w == write - event length) { > > > /*

Re: [PATCH] ring-buffer: Fix slowpath of interrupted event

2023-12-19 Thread Steven Rostedt
On Tue, 19 Dec 2023 10:36:13 -0500 Steven Rostedt wrote: > |-- interrupt event --|-- normal context event --|-- interrupt event --| > > ^^ ^ > || | > ts is before before_stamp

Re: [PATCH] ring-buffer: Fix slowpath of interrupted event

2023-12-19 Thread Steven Rostedt
On Tue, 19 Dec 2023 10:10:27 -0500 Steven Rostedt wrote: > 1000 - interrupt event > 2000 - normal context event > 2100 - next normal context event > > Where we see the delta between the interrupt event and the normal context > event was 1000. But if we just had it be delta = 0, it would be: >

Re: [PATCH] ring-buffer: Fix slowpath of interrupted event

2023-12-19 Thread Steven Rostedt
On Tue, 19 Dec 2023 23:37:10 +0900 Masami Hiramatsu (Google) wrote: > Yeah the above works, but my question is, do we really need this > really slow path? I mean; > > > if (w == write - event length) { > > /* Nothing interrupted between A and C */ > > /*E*/ write_st

Re: [PATCH] ring-buffer: Fix slowpath of interrupted event

2023-12-19 Thread Google
On Mon, 18 Dec 2023 23:07:12 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > To synchronize the timestamps with the ring buffer reservation, there are > two timestamps that are saved in the buffer meta data. > > 1. before_stamp > 2. write_stamp > > When the two are equal, th

[PATCH] ring-buffer: Fix slowpath of interrupted event

2023-12-18 Thread Steven Rostedt
From: "Steven Rostedt (Google)" To synchronize the timestamps with the ring buffer reservation, there are two timestamps that are saved in the buffer meta data. 1. before_stamp 2. write_stamp When the two are equal, the write_stamp is considered valid, as in, it may be used to calculate the del