lkml.org 
[lkml]   [2016]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCHv2 3/7] printk: introduce per-cpu alt_print seq buffer
On (10/06/16 15:08), Petr Mladek wrote:
[..]
> > +static int vprintk_nmi(const char *fmt, va_list args)
> > +{
> > + struct alt_printk_seq_buf *s = this_cpu_ptr(&nmi_print_seq);
> > + int add;
> > +
> > + add = alt_printk_log_store(s, fmt, args);
> > + if (!add)
> > + atomic_inc(&nmi_message_lost);
>
> This would could also empty string as an error. A solution might be
> update alt_printk_log_store() to return -1 in case of lost log.
> Note that vprintk_nmi() still needs to return 0 in this case to
> stay compatible with printk().

will do.

> > +static int vprintk_alt(const char *fmt, va_list args)
> > +{
> > + struct alt_printk_seq_buf *s = this_cpu_ptr(&alt_print_seq);
> > +
> > + return alt_printk_log_store(s, fmt, args);
>
> We should handle lost strings here as well. But it can be
> done in a followup patch.

ok, will do.

-ss

\
 
 \ /
  Last update: 2016-10-10 03:57    [W:8.772 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site