mbox series

[v2,0/9] eal: cleanup resources on shutdown

Message ID 20200428231415.17985-1-stephen@networkplumber.org (mailing list archive)
Headers
Series eal: cleanup resources on shutdown |

Message

Stephen Hemminger April 28, 2020, 11:14 p.m. UTC
  Started using valgrind with DPDK, and there are lots of leftover
memory and file descriptors. This makes it hard to find application
leaks versus 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 are no new exposed API or ABI changes here.

v2
 - rebase after 20.05 file renames
 - incorporate review comment feedback
 - hold off some of the more involved patches for later

Stephen Hemminger (8):
  eal: log: close on cleanup
  eal: log: free dynamic state on cleanup
  eal: alarm: close file on cleanup
  eal: cleanup threads
  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/librte_eal/common/eal_common_log.c  | 33 ++++++++++++++++++++++++-
 lib/librte_eal/common/eal_common_proc.c | 17 +++++++++----
 lib/librte_eal/common/eal_private.h     | 20 +++++++++++++++
 lib/librte_eal/common/hotplug_mp.c      |  5 ++++
 lib/librte_eal/common/hotplug_mp.h      |  6 +++++
 lib/librte_eal/common/malloc_heap.c     |  6 +++++
 lib/librte_eal/common/malloc_heap.h     |  3 +++
 lib/librte_eal/common/malloc_mp.c       | 12 +++++++++
 lib/librte_eal/common/malloc_mp.h       |  3 +++
 lib/librte_eal/freebsd/eal.c            |  1 +
 lib/librte_eal/freebsd/eal_alarm.c      | 10 ++++++++
 lib/librte_eal/linux/eal.c              | 20 +++++++++++++++
 lib/librte_eal/linux/eal_alarm.c        | 11 +++++++++
 lib/librte_eal/linux/eal_log.c          | 14 +++++++++++
 lib/librte_eal/linux/eal_vfio.h         |  1 +
 lib/librte_eal/linux/eal_vfio_mp_sync.c |  8 ++++++
 16 files changed, 164 insertions(+), 6 deletions(-)