Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1540801

Re: [RFC][PATCHv5 5/7] printk: report lost messages in printk safe/nmi contexts

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCHv5 5/7] printk: report lost messages in printk safe/nmi contexts
Date 2016-12-13 03:00 +0100
Message-ID <sNKxP-3oy-3@gated-at.bofh.it> (permalink)
References <sJA41-4xo-5@gated-at.bofh.it> <sJA42-4xo-19@gated-at.bofh.it> <sNBbc-6b6-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On (12/12/16 16:58), Petr Mladek wrote:
> On Thu 2016-12-01 22:55:44, Sergey Senozhatsky wrote:
[..]
> But not really because we report lost messages from both buffers
> and from all CPUs here.
[..]
> The perfect solution would be to remember the number of lost messages
> in struct printk_safe_seq_buf. Then we might bump the value directly
> in printk_safe_log_store() instead of returning the ugly -ENOSPC.

ok, I can take a look. this won't grow the per-CPU buffers bigger,
but will shrink the actual message buffer size by sizeof(atomic),
not that dramatic.

* unrelated, can be done later (if ever) *

speaking of tha actual message buffer size, we, may be, can move
`struct irq_work' out of printk_safe_seq_buf. there is already
a printk-related per-CPU irq_work in place - wake_up_klogd_work.
so we may be can use it, instead of defining a bunch of new irq_works.
this will increase the printk-safe/nmi per-CPU message buffer size
by sizeof(irq_work).

> Also we could use an universal message (no "NMI" or "printk-safe")
> because it could be printed right after flushing the messages
> that fit the buffer.

this "context" part probably can be dropped. both printk-safe and
printk-nmi per-CPU buffer sizes are controlled by a single .config
option anyway; user can't increase the printk-safe buffer size
without increasing the printk-nmi buffer size (in case if printk-safe
buffer is too small).

> This solution is good enough and still better than the previous one, so
> 
> Reviewed-by: Petr Mladek <pmladek@suse.com>

thanks.

	-ss

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC][PATCHv5 5/7] printk: report lost messages in printk  safe/nmi contexts Petr Mladek <pmladek@suse.com> - 2016-12-12 17:00 +0100
  Re: [RFC][PATCHv5 5/7] printk: report lost messages in printk  safe/nmi contexts Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-12-13 03:00 +0100
    Re: [RFC][PATCHv5 5/7] printk: report lost messages in printk  safe/nmi contexts Petr Mladek <pmladek@suse.com> - 2016-12-14 12:00 +0100

csiph-web