[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171014092129.GD2973@tigerII.localdomain>
Date: Sat, 14 Oct 2017 18:21:29 +0900
From: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Petr Mladek <pmladek@...e.com>,
Peter Zijlstra <peterz@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [PATCH] printk: Remove superfluous memory barriers from
printk_safe
On (10/11/17 12:46), Steven Rostedt wrote:
> From: Steven Rostedt (VMware) <rostedt@...dmis.org>
>
> The variable printk_safe_irq_ready is set and never cleared at system
> boot up, when there's only one CPU active. It is set before other
> CPUs come on line. Also, it is extremely unlikely that an NMI would
> trigger this early in boot up (which I wonder why we even have this
> variable at all).
it's not only NMI related, printk() recursion can happen at any stages,
including... um... wait a second. ... including the "before we set up
per-CPU areas" stage? hmm... smells like a bug?
do we need to move per-CPU printk_safe buffers out of per-CPU and turn
it into a global static buffer? like logbuf, and just give every CPU a
starting offset of its printk_safe_logbuf part.
IOW,
char printk_safe_logbuf[number of cpus * sizeof printk safe buffer];
cpu0 offset 0, up to sizeof printk safe buffer
cpu1 offset sizeof printk safe buffer, up to 2 * sizeof printk safe buffer
etc.
or... at least. avoid stoing to per-CPU printk-safe/printk-nmi buffers
unless we've got per-CPU areas set up? or am I hallucinating?
-ss
Powered by blists - more mailing lists