> 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.


Reply via email to