openvswitch: use percpu flow stats
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Thu, 15 Sep 2016 22:11:53 +0000 (19:11 -0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Sep 2016 02:14:01 +0000 (22:14 -0400)
commitdb74a3335e0f645e3139c80bcfc90feb01d8e304
tree5adec60da4faa80b188cc0b45639224c0a197db4
parent40773966ccf1985a1b2bb570a03cbeaf1cbd4e00
openvswitch: use percpu flow stats

Instead of using flow stats per NUMA node, use it per CPU. When using
megaflows, the stats lock can be a bottleneck in scalability.

On a E5-2690 12-core system, usual throughput went from ~4Mpps to
~15Mpps when forwarding between two 40GbE ports with a single flow
configured on the datapath.

This has been tested on a system with possible CPUs 0-7,16-23. After
module removal, there were no corruption on the slab cache.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Cc: pravin shelar <pshelar@ovn.org>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/flow.c
net/openvswitch/flow.h
net/openvswitch/flow_table.c