Thread (6 messages) 6 messages, 3 authors, 2012-06-26

Re: [PATCH 5/6] tuntap: per queue 64 bit stats

flat view

From: Eric Dumazet <hidden>
Date: 2012-06-25 12:52:53
Also in: lkml

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.

I suggest this patch comes before 'tuntap: multiqueue support' in the
serie.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help