datapath: Use percpu allocator for flow-stats.
authorPravin B Shelar <pshelar@nicira.com>
Thu, 5 Dec 2013 23:50:27 +0000 (15:50 -0800)
committerPravin B Shelar <pshelar@nicira.com>
Tue, 3 Dec 2013 16:57:56 +0000 (08:57 -0800)
commitb0f3a2feef9889d7e23f7941858c0c40b0505d87
tree37df9200f549955720b41d149ac9374f28a87beb
parent5c89b171e28fb9b1a60992ea65e226273b474c5a
datapath: Use percpu allocator for flow-stats.

Use percpu allocator for stats due to objection to stats array.
But percpu allocator is not designed for high churn allocation/
deallcation. so we need to avoid allocating percpu flow for
short lived flows. One cheaper way to detect flow is by checking
if 5-tuple used in RSS are masked or not. if any one of them is
masked, flow is likely shared across CPU where percpu stat
should be more scalable. And that flow should be relatively
long lived flow.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/datapath.c
datapath/flow.c
datapath/flow.h
datapath/flow_netlink.c
datapath/flow_netlink.h
datapath/flow_table.c
datapath/flow_table.h