[PATCH] smc91x: move TX processing out of IRQ context entirely
From: Nicolas Pitre <nico@cam.org> When large amount of packets are sent, the most likely source of throttling (when THROTTLE_TX_PKTS is off) is the completion of on-chip buffer allocation that triggers an IRQ. Instead of pushing data to the chip in IRQ context, we now schedule a tasklet which has the big advantage of being interruptible by the RX packet IRQ giving the RX processing the ultimate priority over anything else. This is really important especially on the SMC91C111 which has only 4 packet buffers total regardless of packet size and has a tendency of suffering from RX overruns. This change allows RX packets to be pulled immediately upon arrival instead of having to wait for a (possibly much larger) TX packet to be entirely pushed onto the chip. The THROTTLE_TX_PKTS logic is also a bit more efficient as it now looks for a packet already been transmitted before stopping the queue therefore decreasing unnecessary TX idle periods while still keeping most buffers free for RX packets. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Andrew Morton <akpm@osdl.org>
Showing
Please register or sign in to comment