Implement intr_handler_needs_execution() to serve the purpose of allowing high-frequency interrupts to be batched.
By calling intr_handler_needs_execution() the driver acknowledge interrupts that occurred after the invocation of the current interrupt handler call.
This change basically reverts r357004.
Interrupt handlers can do batching like this:
static void interrupt_handler(void *arg) { int to = 1000; do { /* interrupt code */ } while (to-- && intr_handler_needs_execution(ih_cookie)); }
Sponsored by: Mellanox Technologies
Perhaps commit the re-sorting independently first?