On Nov 6, 2014, at 12:28 PM, Ben Pfaff <b...@nicira.com> wrote: > On Thu, Nov 06, 2014 at 10:50:09AM -0800, Jarno Rajahalme wrote: >> With notes below: >> >> Acked-by: Jarno Rajahalme <jrajaha...@nicira.com> >> >> On Nov 6, 2014, at 10:03 AM, Ben Pfaff <b...@nicira.com> wrote: >> >>> Inserting or removing a sequence of flows with different wildcard patterns >>> causes temporary use of O(n**2) memory due to pvector modifications inside >>> the classifier. This commit fixes the problem in two easy cases. There >>> is at least one more difficult case inside ovs-vswitchd that this does not >>> fix. >> >> I’m curious about the case inside ovs-vswitchd... > > It occurs when you do an "ovs-ofctl del-flows" that deletes all of the > subtables. Each subtable deletion creates a new copy of the pvector but > we can't free the old one yet. Bang!
This could be solved by changing the vector to create holes (NULL pointers), and make the users deal with those. It seems like updating the vector iterators would suffice, so the change could be invisible to the users, actually. Could rate-limit the reallocation or issue a new version whenever the number of holes gets too big? Thoughts? Jarno _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev