Re: [PATCH 0/6] tracing/ring-buffer: Fix wakeup of ring buffer waiters

2024-03-10 Thread Steven Rostedt
On Fri, 8 Mar 2024 13:41:59 -0800 Linus Torvalds wrote: > On Fri, 8 Mar 2024 at 13:39, Linus Torvalds > wrote: > > > > So the above "complexity" is *literally* just changing the > > > > (new = atomic_read_acquire(>seq)) != old > > > > condition to > > > >

Re: [PATCH 0/6] tracing/ring-buffer: Fix wakeup of ring buffer waiters

2024-03-08 Thread Linus Torvalds
On Fri, 8 Mar 2024 at 13:39, Linus Torvalds wrote: > > So the above "complexity" is *literally* just changing the > > (new = atomic_read_acquire(>seq)) != old > > condition to > > should_exit || > (new = atomic_read_acquire(>seq)) != old ..

Re: [PATCH 0/6] tracing/ring-buffer: Fix wakeup of ring buffer waiters

2024-03-08 Thread Linus Torvalds
On Fri, 8 Mar 2024 at 13:33, Steven Rostedt wrote: > > There's two layers: > > 1) the ring buffer has the above simple producer / consumer. >Where the wake ups can happen at the point of where the buffer has >the amount filled that the consumer wants to start consuming with. > > 2) The

Re: [PATCH 0/6] tracing/ring-buffer: Fix wakeup of ring buffer waiters

2024-03-08 Thread Steven Rostedt
On Fri, 8 Mar 2024 12:39:10 -0800 Linus Torvalds wrote: > On Fri, 8 Mar 2024 at 10:38, Steven Rostedt wrote: > > > > A patch was sent to "fix" the wait_index variable that is used to help with > > waking of waiters on the ring buffer. The patch was rejected, but I started > > looking at

Re: [PATCH 0/6] tracing/ring-buffer: Fix wakeup of ring buffer waiters

2024-03-08 Thread Linus Torvalds
On Fri, 8 Mar 2024 at 10:38, Steven Rostedt wrote: > > A patch was sent to "fix" the wait_index variable that is used to help with > waking of waiters on the ring buffer. The patch was rejected, but I started > looking at associated code. Discussing it on IRC with Mathieu Desnoyers > we

[PATCH 0/6] tracing/ring-buffer: Fix wakeup of ring buffer waiters

2024-03-08 Thread Steven Rostedt
A patch was sent to "fix" the wait_index variable that is used to help with waking of waiters on the ring buffer. The patch was rejected, but I started looking at associated code. Discussing it on IRC with Mathieu Desnoyers we discovered a design flaw. The waiter reads "wait_index" then enters