Date: Mon, 24 Jul 2006 11:23:27 -0700 From: "Douglas W. Goodall" <douglas_goodall@mac.com> To: <freebsd-mobile@freebsd.org> Subject: Doug's method for suppressing stray interrupt logging Message-ID: <000301c6af4e$433d2b70$6dce46c0@dougwide>
next in thread | raw e-mail | index | archive | help
Hello Yousef and All, In /usr/src/sys/i386/i386/intr_machdep.c: 197 /* 198 * For stray interrupts, mask and EOI the source, bump the 199 * stray count, and log the condition. 200 */ 201 if (ie == NULL || TAILQ_EMPTY(&ie->ie_handlers)) { 202 isrc->is_pic->pic_disable_source(isrc, PIC_EOI); 203 204 /* (*isrc->is_straycount)++; 205 if (*isrc->is_straycount < MAX_STRAY_LOG) 206 log(LOG_ERR, "stray irq%d\n", vector); 207 else if (*isrc->is_straycount == MAX_STRAY_LOG) 208 log(LOG_CRIT, 209 "too many stray irq %d's: not logging anymore\n", 210 vector); 211 */ 212 213 return; See line 204 where /* starts the suspension See line 211 where */ ends the suspension Ian, Your question was good. Since the IBM AT there have been two programmable interrupt controllers in the architecture. The second one is slaved off the first one attached to the IR7 line of the primary pic. The interrupt routine does the necessay things to remove a valid interrupt cause and sends the End of Interrupt (EOI)command to the PIC. In the case of the "default ir7", there is no valid cause and that is why it is called a stray interrupt. The interrupt code in 6.1 looks good but IMHO the code shouldn't bother to log the strays. The code is handling them properly and my only contention is that the messenger should be ignored. One coud say, "Gee my Sharp PC-MM20 has a noisy bus and gets more default ir7's than some other box", but in the pig picture a few extra trips into the interrupt code is not enough cycles to sneeze at. BTW: The reason I didn't just change the value of MAX_STRAY_LOG was a nagging concern that if too many Stray interrupts occurred (like 32768) there might be a signed/unsigned comparison problem in the code that might cause the logging suspension to fail unexpectedly. Is is a great honor for me to share some hard earned knowledge with the community. :-) Respectfully, Douglas W. Goodall FreeBSD Enthusiast
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000301c6af4e$433d2b70$6dce46c0>