loopback driver carefully uses per_cpu storage for statistics but updates loopback_dev.last_rx

As last_rx is only used by bond driver to detect link activity, and loopback dev wont be used as a bond slave, can we avoid this write access that slowdown SMP platforms, because of cache ping pongs ?

If this patch is not correct, I suspect we should update trans_start in loopback driver since the condition in the bond driver is bidirectional :

if (((jiffies - slave->dev->trans_start) <= delta_in_ticks) &&
        ((jiffies - slave->dev->last_rx) <= delta_in_ticks)) {

Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
--- a/drivers/net/loopback.c    2006-02-07 12:10:55.000000000 +0100
+++ b/drivers/net/loopback.c    2006-02-08 16:49:08.000000000 +0100
@@ -147,7 +147,6 @@
                return 0;
        }
 #endif
-       dev->last_rx = jiffies;
 
        lb_stats = &per_cpu(loopback_stats, get_cpu());
        lb_stats->rx_bytes += skb->len;

Reply via email to