[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140627104059.2f08aeb3@gandalf.local.home>
Date: Fri, 27 Jun 2014 10:40:59 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Petr Mládek <pmladek@...e.cz>
Cc: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jiri Kosina <jkosina@...e.cz>, Michal Hocko <mhocko@...e.cz>,
Jan Kara <jack@...e.cz>,
Frederic Weisbecker <fweisbec@...il.com>,
Dave Anderson <anderson@...hat.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Konstantin Khlebnikov <koct9i@...il.com>
Subject: Re: [RFC][PATCH 5/5 v2] x86/nmi: Perform a safe NMI stack trace on
all CPUs
On Fri, 27 Jun 2014 16:32:46 +0200
Petr Mládek <pmladek@...e.cz> wrote:
> > +/*
> > + * It is not safe to call printk() directly from NMI handlers.
> > + * It may be fine if the NMI detected a lock up and we have no choice
> > + * but to do so, but doing a NMI on all other CPUs to get a back trace
> > + * can be done with a sysrq-l. We don't want that to lock up, which
> > + * can happen if the NMI interrupts a printk in progress.
> > + *
> > + * Instead, we redirect the vprintk() to this nmi_vprintk() that writes
> > + * the content into a per cpu seq_buf buffer. Then when the NMIs are
> > + * all done, we can safely dump the contents of the seq_buf to a printk()
> > + * from a non NMI context.
> > + */
>
> I would move this comment above #define NMI_BUF_SIZE
> It should be on top because it helps to understand many other tricks that are
> used above.
>
I have no problem with moving it. This started out as a simple comment
and then I just got carried away ;-)
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists