mbox series

[v6,0/5] cleanup more resources on eal_cleanup

Message ID 20211113172257.6543-1-stephen@networkplumber.org (mailing list archive)
Headers
Series cleanup more resources on eal_cleanup |

Message

Stephen Hemminger Nov. 13, 2021, 5:22 p.m. UTC
  When testing using ASAN or valgrind with DPDK; there are lots of leftover
memory and file descriptors. This makes it hard to find application
leaks versus internal DPDK leaks.

The DPDK has a function that applications can use to tell it
to cleanup resources on shutdown (rte_eal_cleanup). But the
current coverage of that API is spotty. Many internal parts of
DPDK leave files and allocated memory behind.

This patch set is a first step at getting the sub-parts of
DPDK to cleanup after themselves. These are the easier ones,
the harder and more critical ones are in the drivers
and the memory subsystem.

There should be no new exposed API or ABI changes here.

v6 - fix windows stub 
v5 - add stub for windows build in rte_malloc cleanup
v4
 - rebase to 20.11-rc
 - drop one patch (alarm cleanup is implemented)
 - drop patch that ends worker threads on cleanup.
   the test is calling rte_exit/eal_cleanup in a forked process.
   (could argue this is a test bug)!


Stephen Hemminger (5):
  eal: close log in eal_cleanup
  eal: mp: end the multiprocess thread during cleanup
  eal: vfio: cleanup the mp sync handle
  eal: hotplug: cleanup multiprocess resources
  eal: malloc: cleanup mp resources

 lib/eal/common/eal_common_log.c  | 13 +++++++++++++
 lib/eal/common/eal_common_proc.c | 20 +++++++++++++++++---
 lib/eal/common/eal_private.h     |  7 +++++++
 lib/eal/common/hotplug_mp.c      |  5 +++++
 lib/eal/common/hotplug_mp.h      |  6 ++++++
 lib/eal/common/malloc_heap.c     |  6 ++++++
 lib/eal/common/malloc_heap.h     |  3 +++
 lib/eal/common/malloc_mp.c       | 12 ++++++++++++
 lib/eal/common/malloc_mp.h       |  3 +++
 lib/eal/linux/eal.c              |  7 +++++++
 lib/eal/linux/eal_log.c          |  8 ++++++++
 lib/eal/linux/eal_vfio.h         |  1 +
 lib/eal/linux/eal_vfio_mp_sync.c |  8 ++++++++
 lib/eal/windows/eal_mp.c         |  7 +++++++
 14 files changed, 103 insertions(+), 3 deletions(-)
  

Comments

Thomas Monjalon Feb. 11, 2022, 8:17 p.m. UTC | #1
13/11/2021 18:22, Stephen Hemminger:
> Stephen Hemminger (5):
>   eal: close log in eal_cleanup
>   eal: mp: end the multiprocess thread during cleanup
>   eal: vfio: cleanup the mp sync handle
>   eal: hotplug: cleanup multiprocess resources
>   eal: malloc: cleanup mp resources

Applied, thanks.