Re: [PATCH] b44: add 64 bit stats
From: Eric Dumazet <hidden>
Date: 2012-07-20 04:53:14
On Thu, 2012-07-19 at 21:56 -0400, Kevin Groeneveld wrote:
I am still trying to make sure I understand this fully. I want to update some other drivers with 64 bit stats as well. What you said seems to make sense, but... I was looking at the virtio_net.c driver. One spot in this driver which updates the stats is the receive_buf function. recive_buf is called from virtnet_poll which is registered as a napi poll function. According to Documentation/networking/netdevices.txt the poll function is called in a softirq context. However, the function which reads the stats uses u64_stats_fetch_begin/u64_stats_fetch_retry. Shouldn't this be u64_stats_fetch_begin_bh/u64_stats_fetch_retry_bh for the exact reasons you described for my b44 patch?
Absolutely. You can argue that probably nobody use this driver on a 32bit UP machine, but technically speaking the current implementation is racy.