Don't bother exiting storming mode once a second to see if it has gone

away, instead only exit storming mode when an interrupt stops firing long
enough for the ithread to exit the loop and go back to sleep.

Tested by:	macrus (cruder version)
This commit is contained in:
John Baldwin 2004-11-17 14:39:41 +00:00
parent 8b099b734b
commit d0b4135e00
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137818

View File

@ -554,22 +554,14 @@ ithread_loop(void *arg)
*
* If this interrupt source is currently storming,
* then throttle it to only fire the handler once
* per clock tick. Each second we go out of storming
* mode to see if the storm has subsided.
* per clock tick.
*
* If this interrupt source is not currently
* storming, but the number of back to back
* interrupts exceeds the storm threshold, then
* enter storming mode.
*/
if (storming) {
tsleep(&count, td->td_priority, "istorm", 1);
if (count > hz) {
storming = 0;
count = 0;
} else
count++;
} else if (intr_storm_threshold != 0 &&
if (!storming && intr_storm_threshold != 0 &&
count >= intr_storm_threshold) {
if (!warned) {
printf(
@ -578,8 +570,10 @@ ithread_loop(void *arg)
warned = 1;
}
storming = 1;
count = 0;
} else
}
if (storming)
tsleep(&count, td->td_priority, "istorm", 1);
else
count++;
if (ithd->it_enable != NULL)