[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091208.201043.00804865.davem@davemloft.net>
Date: Tue, 08 Dec 2009 20:10:43 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: jeffrey.t.kirsher@...el.com
Cc: netdev@...r.kernel.org, gospo@...hat.com, eric.dumazet@...il.com
Subject: Re: [PATCH 1/2] ixgbe: Fix TX stats accounting
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Date: Tue, 08 Dec 2009 09:22:03 -0800
> From: Eric Dumazet <eric.dumazet@...il.com>
>
> Here is an updated version, because ixgbe_get_ethtool_stats()
> needs to call dev_get_stats() or "ethtool -S" wont give
> correct tx_bytes/tx_packets values.
>
> Several cpus can update netdev->stats.tx_bytes & netdev->stats.tx_packets
> in parallel. In this case, TX stats are under estimated and false sharing
> takes place.
>
> After a pktgen session sending exactly 200000000 packets :
> # ifconfig fiber0 | grep TX
> TX packets:198501982 errors:0 dropped:0 overruns:0 carrier:0
>
>
> Multi queue devices should instead use txq->tx_bytes & txq->tx_packets
> in their xmit() method (appropriate txq lock already held by caller, no
> cache line miss), or use appropriate locking.
>
> After patch, same pktgen session gives :
>
> # ifconfig fiber0 | grep TX
> TX packets:200000000 errors:0 dropped:0 overruns:0 carrier:0
>
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists