Re: [RFC PATCH] openvswitch: use percpu flow stats

2016-08-19 Thread David Miller
From: Eric Dumazet Date: Fri, 19 Aug 2016 21:07:52 -0700 > Here is an example of a system I had in the past. > > 8 cpus (num_possible_cpus() returns 8) > > Cpus were numbered : 0, 1, 2, 3, 8, 9, 10, 11 : (nr_cpu_ids = 12) > > I am pretty sure they are still alive. > > Since you want an arra

Re: [RFC PATCH] openvswitch: use percpu flow stats

2016-08-19 Thread Eric Dumazet
On Fri, 2016-08-19 at 18:09 -0700, David Miller wrote: > From: Eric Dumazet > Date: Fri, 19 Aug 2016 12:56:56 -0700 > > > On Fri, 2016-08-19 at 16:47 -0300, Thadeu Lima de Souza Cascardo wrote: > >> Instead of using flow stats per NUMA node, use it per CPU. When using > >> megaflows, the stats lo

Re: [RFC PATCH] openvswitch: use percpu flow stats

2016-08-19 Thread David Miller
From: Eric Dumazet Date: Fri, 19 Aug 2016 12:56:56 -0700 > On Fri, 2016-08-19 at 16:47 -0300, Thadeu Lima de Souza Cascardo wrote: >> Instead of using flow stats per NUMA node, use it per CPU. When using >> megaflows, the stats lock can be a bottleneck in scalability. > > ... > >> >> flo

Re: [RFC PATCH] openvswitch: use percpu flow stats

2016-08-19 Thread Eric Dumazet
On Fri, 2016-08-19 at 16:47 -0300, Thadeu Lima de Souza Cascardo wrote: > Instead of using flow stats per NUMA node, use it per CPU. When using > megaflows, the stats lock can be a bottleneck in scalability. ... > > flow_cache = kmem_cache_create("sw_flow", sizeof(struct sw_flow) > -

[RFC PATCH] openvswitch: use percpu flow stats

2016-08-19 Thread Thadeu Lima de Souza Cascardo
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. ---