diff options
| author | Vlad Buslov <[email protected]> | 2019-06-13 14:54:04 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2019-06-15 02:29:57 +0000 |
| commit | 99815f5031db36414178f45e3009fb5f0e219dd4 (patch) | |
| tree | 3315f9e1d75ea2f8a030260f42a4bb626b6d3593 /net/ipv4/tcp_output.c | |
| parent | net: dsa: fix warning same module names (diff) | |
| download | kernel-99815f5031db36414178f45e3009fb5f0e219dd4.tar.gz kernel-99815f5031db36414178f45e3009fb5f0e219dd4.zip | |
net: sched: flower: don't call synchronize_rcu() on mask creation
Current flower mask creating code assumes that temporary mask that is used
when inserting new filter is stack allocated. To prevent race condition
with data patch synchronize_rcu() is called every time fl_create_new_mask()
replaces temporary stack allocated mask. As reported by Jiri, this
increases runtime of creating 20000 flower classifiers from 4 seconds to
163 seconds. However, this design is no longer necessary since temporary
mask was converted to be dynamically allocated by commit 2cddd2014782
("net/sched: cls_flower: allocate mask dynamically in fl_change()").
Remove synchronize_rcu() calls from mask creation code. Instead, refactor
fl_change() to always deallocate temporary mask with rcu grace period.
Fixes: 195c234d15c9 ("net: sched: flower: handle concurrent mask insertion")
Reported-by: Jiri Pirko <[email protected]>
Signed-off-by: Vlad Buslov <[email protected]>
Tested-by: Jiri Pirko <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
0 files changed, 0 insertions, 0 deletions
