Re: [PATCH 5/6] tuntap: per queue 64 bit stats
On 06/25/2012 08:52 PM, Eric Dumazet wrote:
On Mon, 2012-06-25 at 19:59 +0800, Jason Wang wrote:As we've added multiqueue support for tun/tap, this patch convert the statistics to use per-queue 64 bit statistics.LLTX means you can have several cpus calling TX path in parallel. So tx stats are wrong (even before this patch), and racy after this patch (if several cpu access same queue, it seems to be possible) u64_stats_update_begin(&tfile->stats.tx_syncp); tfile->stats.tx_packets++; tfile->stats.tx_bytes += total; u64_stats_update_end(&tfile->stats.tx_syncp); This can break horribly if several cpus run this code using same 'tfile' pointer.
Yes, looks like it's hard to use NETIF_F_LLTX without breaking the u64 statistics, may worth to use tx lock and alloc_netdev_mq().
I suggest this patch comes before 'tuntap: multiqueue support' in the serie.
-- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion] [Ethernet Bridging] [Linux Wireless Networking] [Linux Bluetooth Networking] [Linux Networking Users] [VLAN] [Git] [IETF Annouce] [Linux Assembly] [Security] [Bugtraq] [Photo] [Singles Social Networking] [Yosemite Information] [MIPS Linux] [ARM Linux Kernel] [ARM Linux] [Linux Virtualization] [Linux Security] [Linux IDE] [Linux RAID] [Linux SCSI] [Free Dating]