[ovs-git] [openvswitch/ovs] 67ad54: dpif-netdev: Garbage collect the exact match cache...

GitHub noreply at github.com
Fri Nov 21 16:06:18 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 67ad54cbc8a8cbe367e5f8d857ff2174d8bca9f9
      https://github.com/openvswitch/ovs/commit/67ad54cbc8a8cbe367e5f8d857ff2174d8bca9f9
  Author: Alex Wang <alexw at nicira.com>
  Date:   2014-11-21 (Fri, 21 Nov 2014)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  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 <alexw at nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>

---
PATCH -> V2:
- Adopt Jarno's suggestion and conduct slow sweep to avoid introducing
  jitter.




More information about the git mailing list