Re: [RFC PATCH v1 07/25] printk-rb: add functionality required by printk

2019-02-22 Thread Petr Mladek
On Tue 2019-02-19 23:08:20, John Ogness wrote: > On 2019-02-18, Petr Mladek wrote: > >> The printk subsystem needs to be able to query the size of the ring > >> buffer, seek to specific entries within the ring buffer, and track > >> if records could not be stored in the ring buffer. > >> > >>

Re: [RFC PATCH v1 07/25] printk-rb: add functionality required by printk

2019-02-19 Thread John Ogness
On 2019-02-18, Petr Mladek wrote: >> The printk subsystem needs to be able to query the size of the ring >> buffer, seek to specific entries within the ring buffer, and track >> if records could not be stored in the ring buffer. >> >> diff --git a/lib/printk_ringbuffer.c

Re: [RFC PATCH v1 07/25] printk-rb: add functionality required by printk

2019-02-18 Thread Petr Mladek
On Tue 2019-02-12 15:29:45, John Ogness wrote: > The printk subsystem needs to be able to query the size of the ring > buffer, seek to specific entries within the ring buffer, and track > if records could not be stored in the ring buffer. > > diff --git a/lib/printk_ringbuffer.c

Re: [RFC PATCH v1 07/25] printk-rb: add functionality required by printk

2019-02-13 Thread John Ogness
On 2019-02-12, Linus Torvalds wrote: > On Tue, Feb 12, 2019 at 6:30 AM John Ogness wrote: >> >> + while (atomic_long_read(>lost)) { >> + atomic_long_dec(>lost); >> + rb->seq++; >> + } > > This

Re: [RFC PATCH v1 07/25] printk-rb: add functionality required by printk

2019-02-12 Thread Linus Torvalds
On Tue, Feb 12, 2019 at 6:30 AM John Ogness wrote: > > + while (atomic_long_read(>lost)) { > + atomic_long_dec(>lost); > + rb->seq++; > + } This looks like crazy garbage. It's neither atomic

[RFC PATCH v1 07/25] printk-rb: add functionality required by printk

2019-02-12 Thread John Ogness
The printk subsystem needs to be able to query the size of the ring buffer, seek to specific entries within the ring buffer, and track if records could not be stored in the ring buffer. Signed-off-by: John Ogness --- include/linux/printk_ringbuffer.h | 5 +++ lib/printk_ringbuffer.c