Let me be clear about what I mean by interrupt rate limiting:
interrupt()
{
harvester(...)
}
harvester(...)
{
if (queue is not full) {
... add data to queue (reasonably sized queue, like 32 entries)
}
}
queue-runner(...)
{
for(;;) {
sleep for 1/10 second
Pull next item (if any) off queue
}
}
That is what my patch does. If a high rate of interrupts occur, the
queue becomes full almost instantly because the queue-runner only
pulls one item off per 1/10 second. The result is that the
harvester() routine effectively becomes a NOP for most of the
interrupts.
This is the proper solution. It is not appropriate to go bcopy()ing
data for every single interrupt routine that calls the harvester,
no matter how little data it is. Some interrupts can be processed
very quickly and even a small 'fast' procedure can double the interrupt
overhead for those interrupts. It is simply not appropriate to go
harvesting every time an interrupt occurs.
-Matt
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message