* mlx4 interrupt coalescing not important for small packets?
@ 2013-08-09 17:06 Shawn Bohrer
2013-08-11 13:23 ` Amir Vadai
0 siblings, 1 reply; 2+ messages in thread
From: Shawn Bohrer @ 2013-08-09 17:06 UTC (permalink / raw)
To: netdev; +Cc: Amir Vadai
I was looking at the adaptive interrupt coalescing algorithm for
mlx4_en which contains the following snippet:
/* Apply auto-moderation only when packet rate
* exceeds a rate that it matters */
if (rate > (MLX4_EN_RX_RATE_THRESH / priv->rx_ring_num) &&
avg_pkt_size > MLX4_EN_AVG_PKT_SMALL) {
if (rate < priv->pkt_rate_low)
moder_time = priv->rx_usecs_low;
else if (rate > priv->pkt_rate_high)
moder_time = priv->rx_usecs_high;
else
moder_time = (rate - priv->pkt_rate_low) *
(priv->rx_usecs_high - priv->rx_usecs_low) /
(priv->pkt_rate_high - priv->pkt_rate_low) +
priv->rx_usecs_low;
} else {
moder_time = priv->rx_usecs_low;
}
In this case MLX4_EN_AVG_PKT_SMALL is 256 bytes. Can someone explain
to me why interrupt coalescing is not important for small packets
regardless of the incoming packet rate?
Thanks,
Shawn
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mlx4 interrupt coalescing not important for small packets?
2013-08-09 17:06 mlx4 interrupt coalescing not important for small packets? Shawn Bohrer
@ 2013-08-11 13:23 ` Amir Vadai
0 siblings, 0 replies; 2+ messages in thread
From: Amir Vadai @ 2013-08-11 13:23 UTC (permalink / raw)
To: Shawn Bohrer; +Cc: netdev, Amir Vadai
On 09/08/2013 20:06, Shawn Bohrer wrote:
> I was looking at the adaptive interrupt coalescing algorithm for
> mlx4_en which contains the following snippet:
>
> /* Apply auto-moderation only when packet rate
> * exceeds a rate that it matters */
> if (rate > (MLX4_EN_RX_RATE_THRESH / priv->rx_ring_num) &&
> avg_pkt_size > MLX4_EN_AVG_PKT_SMALL) {
> if (rate < priv->pkt_rate_low)
> moder_time = priv->rx_usecs_low;
> else if (rate > priv->pkt_rate_high)
> moder_time = priv->rx_usecs_high;
> else
> moder_time = (rate - priv->pkt_rate_low) *
> (priv->rx_usecs_high - priv->rx_usecs_low) /
> (priv->pkt_rate_high - priv->pkt_rate_low) +
> priv->rx_usecs_low;
> } else {
> moder_time = priv->rx_usecs_low;
> }
>
> In this case MLX4_EN_AVG_PKT_SMALL is 256 bytes. Can someone explain
> to me why interrupt coalescing is not important for small packets
> regardless of the incoming packet rate?
>
> Thanks,
> Shawn
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
The idea was that for small packets, should enter "latency mode"
regardless the packet rate.
Amir
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-11 13:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-09 17:06 mlx4 interrupt coalescing not important for small packets? Shawn Bohrer
2013-08-11 13:23 ` Amir Vadai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).