Fix three bugs in the livelock code. Fix a minor range error in an
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 28 Jun 2004 02:33:04 +0000 (02:33 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 28 Jun 2004 02:33:04 +0000 (02:33 +0000)
commit93781523827bd921e097e3328d1cc9818f32825b
tree26260d889edceb9cdd3e7c2efb6048217fe187a5
parent6f394663a5aa3573c5bbb7c8ab1789a475feffb6
Fix three bugs in the livelock code.  Fix a minor range error in an
assertion, fix an incorrect livelock wakeup argument type (which could lead
to crashes), and use the cpu timer instead of ticks since a livelock may
prevent ticks from incrementing.

For now set the livelock limit to 50,000 interrupts/sec, which is about
right for a ~600Mhz P3.  But what we really need to do is scale it based
on the perceived speed of the system since GiGE is likely able to blow
away 50KI/S.

Tested with: inserting and removing cardbus cards quickly and repeatedly,
which normally locks up a FreeBSD box.
sys/kern/kern_intr.c