linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: Keith Owens <kaos@ocs.com.au>
Cc: mingo@elte.hu, Andrew Morton <andrewm@uow.edu.au>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] serial console vs NMI watchdog
Date: Sun, 11 Mar 2001 20:43:16 -0800	[thread overview]
Message-ID: <3AAC53E4.A8BECB23@mvista.com> (raw)
In-Reply-To: <15829.984297122@ocs3.ocs-net>

Keith Owens wrote:
> 
> On Sun, 11 Mar 2001 08:44:24 +0100 (CET),
> Ingo Molnar <mingo@elte.hu> wrote:
> >Andrew,
> >
> >your patch looks too complex, and doesnt cover the case of the serial
> >driver deadlocking. Why not add a "touch_nmi_watchdog_counter()" function
> >that just changes last_irq_sums instead of adding locking? This way
> >deadlocks will be caught in the serial code too. (because touch_nmi() will
> >only "postpone" the NMI watchdog lockup event, not disable it.)
> 
> kdb has to completely disable the nmi counter while it is in control.
> All interrupts are disabled, all but one cpus are spinning, the control
> cpu does busy wait while it polls the input devices.  With that model
> there is no alternative to a complete disable.
> 
Consider this.  Why not use the NMI to sync the cpus.  Kdb would have a
function that is called each NMI.  If it is doing nothing, just return
false, else, if waiting for this cpu, well here it is, put it in spin
AFTER saving where it came from so the operator can figure out what it
is doing.  In kgdb I just put the interrupt registers in the task_struct
where they are put when a context switch is done.  Then the debugger can
do a trace, etc. on that task.  A global var that the debugger can see
is also set to the cpus, "current".  

If the cpu is already spinning, return to the nmi code with a true flag
which will cause it to ignore the nmi.  Same thing if it is the cpu that
is doing debug i/o.

I went to this for kgdb after the system failed to return from the call
to force the other cpus to execute a function (which means they have to
be alive).  For extra safety I also time the sync.  If one or more
expected cpus, don't show while looping reading the cycle counter, the
code just continues with out the sync.

George

  parent reply	other threads:[~2001-03-12  4:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-09 14:21 [patch] serial console vs NMI watchdog Andrew Morton
2001-03-09 16:35 ` Ion Badulescu
2001-03-10  2:41   ` Andrew Morton
2001-03-09 22:23 ` Robert Read
2001-03-11  7:44 ` Ingo Molnar
2001-03-11  7:52   ` Keith Owens
2001-03-11  7:53     ` Ingo Molnar
2001-03-11  8:00       ` Keith Owens
2001-03-11  8:16         ` Andrew Morton
2001-03-11  9:01         ` [patch] nmi-watchdog-2.4.2-A1 Ingo Molnar
2001-03-11 10:08           ` Andrew Morton
2001-03-11 15:04             ` [patch] nmi-watchdog-2.4.2-A2 Ingo Molnar
2001-03-12  4:43     ` george anzinger [this message]
2001-03-12  5:52       ` [patch] serial console vs NMI watchdog Keith Owens
2001-03-12  8:27         ` george anzinger
2001-03-12  8:41           ` Keith Owens

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=3AAC53E4.A8BECB23@mvista.com \
    --to=george@mvista.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrewm@uow.edu.au \
    --cc=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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;
as well as URLs for NNTP newsgroup(s).