Performance is weird (fwd)
One difference between idle and a running user space app is that the kernel->user space return path checks for pending softirqs, but the ide thread doesn't.
Perhaps cpu_idle() should also check for pending softirq's before hlt'ing?
idle thread is running.
* hw interrupt
* * hw interrupt handler
* * * packet arrives
* * * softirq marked
* * hw interrupt handler returns
* do_softirq
* * net_rx called
* * * an hw interrupt interrupts net_rx
* * * * a second packet arrives, softirq marked again.
* * * hw interrupt returns
* * net_rx returns
* do_softirq notices that net_rx is queued again, but doesn't process it immediately (otherwise it would cause an endless loop)
* hw interrupt returns
idle thread sleeps again.
!! one packet is waiting unprocessed
What about adding if(softirq_active...) do_softirq() into default_idle? --
Manfred