Re: [PATCH 2/2] printk: use the lockless ringbuffer

2020-02-13 Thread Sergey Senozhatsky
On (20/02/14 10:41), Sergey Senozhatsky wrote: > On (20/02/13 23:36), John Ogness wrote: [..] > > We could implement it such that devkmsg_read() will skip over data-less > > records instead of issuing an EPIPE. (That is what dmesg does.) But then > > do we need EPIPE at all? The reader can see

Re: [PATCH 2/2] printk: use the lockless ringbuffer

2020-02-13 Thread Sergey Senozhatsky
On (20/02/13 23:36), John Ogness wrote: > >> Here prb_read_valid() was successful, so a record _was_ read. The > >> kerneldoc for the prb_read_valid() says: > > > > Hmm, yeah. That's true. > > > > OK, something weird... > > > > I ran some random printk-pressure test (mostly printks from IRQs; > >

Re: [PATCH 0/2] printk: replace ringbuffer

2020-02-13 Thread Sergey Senozhatsky
On (20/02/13 14:07), Petr Mladek wrote: > On Wed 2020-02-05 17:12:12, John Ogness wrote: > > On 2020-02-05, lijiang wrote: > > > Do you have any suggestions about the size of CONFIG_LOG_* and > > > CONFIG_PRINTK_* options by default? > > > > The new printk implementation consumes more than

Re: [PATCH 2/2] printk: use the lockless ringbuffer

2020-02-13 Thread John Ogness
On 2020-02-13, Sergey Senozhatsky wrote: @@ -890,30 +758,26 @@ static ssize_t devkmsg_read(struct file *file, char __user *buf, logbuf_unlock_irq(); ret = wait_event_interruptible(log_wait, - user->seq

Re: [PATCH 0/2] printk: replace ringbuffer

2020-02-13 Thread Petr Mladek
On Wed 2020-02-05 17:12:12, John Ogness wrote: > On 2020-02-05, lijiang wrote: > > Do you have any suggestions about the size of CONFIG_LOG_* and > > CONFIG_PRINTK_* options by default? > > The new printk implementation consumes more than double the memory that > the current printk

Re: [PATCH 2/2] printk: use the lockless ringbuffer

2020-02-13 Thread Sergey Senozhatsky
On (20/02/13 10:42), John Ogness wrote: > On 2020-02-13, Sergey Senozhatsky wrote: > >> - while (user->seq == log_next_seq) { > >> + if (!prb_read_valid(prb, user->seq, r)) { > >>if (file->f_flags & O_NONBLOCK) { > >>ret = -EAGAIN; > >>

Re: [PATCH] kexec: support parsing the string "Reserved" to get the correct e820 reserved region

2020-02-13 Thread lijiang
在 2020年02月13日 03:46, Bhupesh Sharma 写道: > Hi Lianbo, > > Thanks for the patch. > > On Wed, Feb 12, 2020 at 6:27 PM Lianbo Jiang wrote: >> >> When loading kernel and initramfs for kexec, kexec-tools could get the >> e820 reserved region from "/proc/iomem" in order to rebuild the e820 >> ranges

Re: [PATCH 2/2] printk: use the lockless ringbuffer

2020-02-13 Thread John Ogness
On 2020-02-13, Sergey Senozhatsky wrote: >> -while (user->seq == log_next_seq) { >> +if (!prb_read_valid(prb, user->seq, r)) { >> if (file->f_flags & O_NONBLOCK) { >> ret = -EAGAIN; >> logbuf_unlock_irq(); >> @@ -890,30 +758,26 @@

Re: [PATCH 2/2] printk: use the lockless ringbuffer

2020-02-13 Thread Sergey Senozhatsky
On (20/01/28 17:25), John Ogness wrote: [..] > - while (user->seq == log_next_seq) { > + if (!prb_read_valid(prb, user->seq, r)) { > if (file->f_flags & O_NONBLOCK) { > ret = -EAGAIN; > logbuf_unlock_irq(); > @@ -890,30 +758,26 @@