# Re: \[RFC\] virtio\_net: add local\_bh\_disable() around u64\_stats\_update\_begin

- From: Stephen Hemminger \<stephen@networkplumber.org\>
- Date: 2018-10-17 01:52:53 
- List: netdev
- Page: https://ratatoskr.run/netdev/2018/10/11111913
- Thread: https://ratatoskr.run/netdev/2018/10/11111903/t.md

```text
On Tue, 16 Oct 2018 18:55:45 +0200
Sebastian Andrzej Siewior [ref] wrote:

> Also, ptr->var++ is not an atomic operation even on 64bit CPUs. Which
> means if try_fill_recv() runs on CPU0 (via virtnet_receive()) then the
> worker might run on CPU1.

On modern CPU's increment of native types is atomic but not locked.
u64_stats_update_begin is a no-op on UP and also if BIT_PER_LONG != 32
```
