[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zg0g53qb.fsf@jogness.linutronix.de>
Date: Wed, 18 Oct 2023 17:56:52 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH printk v2 3/4] printk: Skip unfinalized records in panic
On 2023-10-18, Petr Mladek <pmladek@...e.com> wrote:
> So it is the _last_ finalized id from the timing POV. If there are
> more CPUs storing and finalizing the messages in parallel then
> it might change forth and back. There might be earlier non-finalized
> records and newer finalized ones.
>
> It means that prb_next_seq() really is the best effort and
> the description is not valid:
Well, the description was valid until prb_next_seq() was optimized and
converted to best-effort with:
commit f244b4dc53e5 ("printk: ringbuffer: Improve prb_next_seq() performance")
> It would be great to document these subtle details especially when
> we are going to depend on them.
Going through the various call sites of prb_next_seq(), I would argue
that the above optimization introduced some bugs. I will investigate if
prb_next_seq() can be fixed to match its description because the current
users already depend on that.
WRT to this series, I have put together an alternative implementation
that does not use prb_next_seq().
John
Powered by blists - more mailing lists