Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dpif-netdev: Garbage collect the exact match cache periodically.
On current master, the exact match cache entry can keep reference to 'struct dp_netdev_flow' even after the flow is removed from the flow table. This means the free of allocated memory of the flow is delayed until the exact match cache entry is cleared or replaced. If the allocated memory is ahead of chunks of freed memory on heap, the delay will prevent the reclaim of those freed chunks, causing falsely high memory utilization. To fix the issue, this commit makes the owning thread conduct periodic garbage collection on the exact match cache and clear dead entries. Signed-off-by: Alex Wang <[email protected]> Acked-by: Jarno Rajahalme <[email protected]> --- PATCH -> V2: - Adopt Jarno's suggestion and conduct slow sweep to avoid introducing jitter.
- Loading branch information