Re: [ovs-dev] [PATCH] cmap: Shrink cmap when load factor is below 20%.

2014-11-21 Thread Alex Wang
Thx!, applied to master, On Fri, Nov 21, 2014 at 8:36 AM, Ben Pfaff wrote: > On Thu, Nov 20, 2014 at 10:11:46PM -0800, Alex Wang wrote: > > This commit adds check in cmap_remove() and shrinks the cmap by half > > if the load factor is below 20%. This is to reduce the memory > > utilization of c

Re: [ovs-dev] [PATCH] cmap: Shrink cmap when load factor is below 20%.

2014-11-21 Thread Ben Pfaff
On Thu, Nov 20, 2014 at 10:11:46PM -0800, Alex Wang wrote: > This commit adds check in cmap_remove() and shrinks the cmap by half > if the load factor is below 20%. This is to reduce the memory > utilization of cmap and to avoid the allocated cmap memory occupying > the top of heap memory, prevent

[ovs-dev] [PATCH] cmap: Shrink cmap when load factor is below 20%.

2014-11-20 Thread Alex Wang
This commit adds check in cmap_remove() and shrinks the cmap by half if the load factor is below 20%. This is to reduce the memory utilization of cmap and to avoid the allocated cmap memory occupying the top of heap memory, preventing the trim of heap. Signed-off-by: Alex Wang --- lib/cmap.c |