[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 8 Oct 2016 04:33:03 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Jan Kara <jack@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>, Calvin Owens <calvinowens@...com>,
Thomas Gleixner <tglx@...utronix.de>,
Mel Gorman <mgorman@...hsingularity.net>,
Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [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
Powered by blists - more mailing lists