datapath: Use u64_stats_sync for datapath and vport stats.
authorJesse Gross <jesse@nicira.com>
Sat, 19 Nov 2011 17:08:56 +0000 (09:08 -0800)
committerJesse Gross <jesse@nicira.com>
Mon, 21 Nov 2011 18:25:19 +0000 (10:25 -0800)
commit821cb9fac77850ae3546ab38766a58ff5e75e8a8
treeb4d49f41b29f941483e164377a5fcfe5ac02dead
parent6161d3fd928edf7016abae60f549a135a2f83f09
datapath: Use u64_stats_sync for datapath and vport stats.

We currently use a seqcount to prevent reading partial 64-bit stats
on 32-bit CPUs.  u64_stats_sync uses the same logic but elides it on
64-bit and uniprocessor machines.  This improves performance (primarily
on non-x86 architectures) at the cost of not guaranteeing that packet
and byte counts were necessarily read together.

Suggested-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/datapath.c
datapath/datapath.h
datapath/linux/Modules.mk
datapath/linux/compat/include/linux/u64_stats_sync.h [new file with mode: 0644]
datapath/vport.c
datapath/vport.h