> -----Original Message----- > From: Eric W. Biederman [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 02, 2006 4:29 AM > To: Jeff Garzik > Cc: Andi Kleen; Greg Banks; David S. Miller; Leonid Grossman; > [EMAIL PROTECTED]; Linux Network Development list > Subject: Re: Van Jacobson net channels > > Jeff Garzik <[EMAIL PROTECTED]> writes: > > > Andi Kleen wrote: > >> There was already talk some time ago to make NAPI drivers use the > >> hardware mitigation again. The reason is when you have > > > > > > This was discussed on the netdev list, and the conclusion > was that you > > want both NAPI and hw mitigation. This was implemented in > a few drivers, at least. > > How does that deal with the latency that hw mitigation introduces. > When you have a workload that bottle-necked waiting for that > next packet and hw mitigation is turned on you can see some > horrible unjustified slow downs.
There two facilities (at least, in our ASIC, but there is no reason this can't be part of the generic multi-channel driver interface that I will get to shortly) to deal with it. - hardware supports more than one utilization-based interrupt rate (we have four). For lowest utilization range, we always set interrupt rate to one interrupt for every rx packet - exactly for the latency reasons that you are bringing up. Also, cpu is not busy anyways so extra interrupts do not hurt much. For highest utilization range, we set the rate by default to something like an interrupt per 128 packets. There is also timer-based interrupt, as a last resort option. As I mentioned earlier, it would be cool to get these moderation tresholds from NAPI, since it can make a better guess about the overall system utilization than the driver can. But even at the driver level, this works reasonably well. - the moderation scheme is implemented in the ASIC on per channel basis. So, if you have workloads with very distinct latency needs, you can just steer it to a separate channel and have an interrupt moderation that is different from other flows, for example keep an interrupt per packet always. Leonid > > Eric > - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html