On Sun, 2014-01-12 at 10:31 +0100, Willy Tarreau wrote:
Stats writers are mvneta_rx() and mvneta_tx(). They don't lock anything
when they update the stats, and as a result, it randomly happens that
the stats freeze on SMP if two updates happen during stats retrieval.
Your patch is OK, but I dont understand how this freeze can happen.
TX and RX uses a separate syncp, and TX is protected by a lock, RX
is protected by NAPI bit.
Stats retrieval uses the appropriate BH disable before the fetches...
This is very easily reproducible by starting two HTTP servers and binding
each of them to a different CPU, then consulting /proc/net/dev in loops
during transfers, the interface should immediately lock up. This issue
also randomly happens upon link state changes during transfers, because
the stats are collected in this situation, but it takes more attempts to
reproduce it.