mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Frédéric Weisbecker" <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing: use raw spinlocks instead of spinlocks
Date: Tue, 4 Nov 2008 13:03:55 +0100	[thread overview]
Message-ID: <20081104120355.GA19969@elte.hu> (raw)
In-Reply-To: <c62985530811040314o13394d43t201ae3fc2f1304be@mail.gmail.com>


* Frédéric Weisbecker <fweisbec@gmail.com> wrote:

> 2008/11/4 Ingo Molnar <mingo@elte.hu>:
> > lockdep works via a completely different principle: it instruments all
> > the actual lock acquire/release calls and builds a graph of lock
> > dependencies in the system, as it happens.
> >
> > It also guarantees that all the observed locking rules are followed
> > (i.e. it proves that as long as you dont get any messages from
> > lockdep, all the locking patterns are mathematically safe).
> >
> > So a lockdep message will most of the time occur much easier than a
> > real lockup would occur - as lockdep only needs to observe
> > inconsistent locking patterns to prove that a lockup _could_ occur.
> 
> 
> Ok, so if there is such an error, I could (hopefully) see it with
> early_printk....
> 
> 
> > The NMI watchdog just observes the system and complains if it sees
> > hardirqs not progressing (i.e. a hard lockup). It will detect anything
> > that causes a hard lockup. (assuming that the NMI watchdog itself is
> > not locked up)
> >
> > Regarding your lockup ... it's quite hard. Maybe you can get more
> > output out of the system by using:
> >
> >  earlyprintk=vga,keep
> >
> > plus disablig regular tty output. (i.e. not passing any 'console=tty'
> > line to the kernel bootup.)
> >
> > this way you wont get any normal printk activities (which might lock
> > up), you should only get the very simple early-printk output.
> 
> 
> 
> Good idea. After reading your mail, I had a look on early_printk and 
> it shoudn't cause any tracing recursion after your patch: the 
> strings are directly writed to the vga. Great.

just make sure normal printk is totally silent. (otherwise you get 
double lines on the console plus no reduction in recursion risk)

i usually add a return; hack to kernel/printk.c:printk(), to make sure 
it never executes anything. (and add a notrace to it as well) Maybe we 
could even make this dependent on early_printk=...,keep.

	Ingo

  reply	other threads:[~2008-11-04 12:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03  0:01 Frederic Weisbecker
2008-11-03  0:45 ` Steven Rostedt
2008-11-03  1:17   ` Frédéric Weisbecker
2008-11-03  6:46   ` Ingo Molnar
2008-11-03 13:24     ` Frédéric Weisbecker
2008-11-04  2:03     ` Frédéric Weisbecker
2008-11-04  9:43       ` Ingo Molnar
2008-11-04 11:14         ` Frédéric Weisbecker
2008-11-04 12:03           ` Ingo Molnar [this message]
2008-11-05 10:50             ` Frédéric Weisbecker
2008-11-05 10:55               ` Ingo Molnar
2008-11-06  0:41                 ` Frédéric Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081104120355.GA19969@elte.hu \
    --to=mingo@elte.hu \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®