From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <0f871b6bb553a56e50fe8af78f564ede@hamnavoe.com> To: 9fans@9fans.net From: Richard Miller <9fans@hamnavoe.com> Date: Tue, 20 Jul 2010 09:54:22 +0100 In-Reply-To: <1fc2ed1667573e0f022d218e80319be2@hamnavoe.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] apic fail Topicbox-Message-UUID: 40d9d46e-ead6-11e9-9d60-3106f5b1d025 > 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.