9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <9fans@hamnavoe.com>
To: 9fans@9fans.net
Subject: Re: [9fans] apic fail
Date: Tue, 20 Jul 2010 09:54:22 +0100	[thread overview]
Message-ID: <0f871b6bb553a56e50fe8af78f564ede@hamnavoe.com> (raw)
In-Reply-To: <1fc2ed1667573e0f022d218e80319be2@hamnavoe.com>

> Is one interrupt being dispatched to two cpus, I wonder?

The answer appears to be yes.  I bracketed rtl8169interrupt()
with these lines:

static void
rtl8169interrupt(Ureg*, void* arg)
{
  ...
  static Ref twice;
  if(incref(&twice) != 1) iprint("cpu%d: I see everything twice!\n", m->machno);
  ...
  decref(&twice);
}

The result on rebooting was:

cpu0: I see everything twice!
cpu1: I see everything twice!
cpu0: I see everything twice!
cpu0: I see everything twice!
...

many times over.

As a side effect this stops the kernel from crashing, because while one cpu
is doing its iprint, the other can get on with its interrupt routine safely.




      parent reply	other threads:[~2010-07-20  8:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-19 20:14 Richard Miller
2010-07-19 21:25 ` Charles Forsyth
2010-07-19 21:55   ` erik quanstrom
2010-07-20  8:54 ` Richard Miller [this message]

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=0f871b6bb553a56e50fe8af78f564ede@hamnavoe.com \
    --to=9fans@hamnavoe.com \
    --cc=9fans@9fans.net \
    /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).