On Thu, Feb 2, 2012 at 7:05 PM, Jesse Gross <je...@nicira.com> wrote: > On Thu, Feb 2, 2012 at 6:58 AM, Pravin B Shelar <pshe...@nicira.com> wrote: >> cleanups: >> - removes flex_array_shrink() as there is no caller. >> - add flex_array_init() >> - Add few 'const's. >> >> Signed-off-by: Pravin B Shelar <pshe...@nicira.com> > > Since we're going to propose these changes for upstream and we're > going to need to break them apart into individual changes we should > just do that now. > ok
> It's not clear to me that flex_array_init() is that big of a win. > struct flex_array stores the base array inside of it, so it is defined > to be PAGE_SIZE. Since it is so large, storing that inside of another > struct as you do in the third patch isn't necessarily a great idea. > We already allocate the port array separately, so it's not clear why > this is different. As vport flex array does not fit in a page, It needs to access *fa->parts[] element on lookup. By keeping struct flex_array inside struct datapath, I am trying to reduce extra address access. The lookup is done on every packet out and first few parts[] shld be in same cache-line so I think it helps. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev