From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C007A0032; Sat, 13 Nov 2021 01:28:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0719A4013F; Sat, 13 Nov 2021 01:28:30 +0100 (CET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id ABFAF4013F for ; Sat, 13 Nov 2021 01:28:28 +0100 (CET) Received: by mail-pj1-f54.google.com with SMTP id p18-20020a17090ad31200b001a78bb52876so8256808pju.3 for ; Fri, 12 Nov 2021 16:28:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9lvmalgZjlD9XOGqKFEMn/FI4YpAZndk01IZpWwPJqg=; b=axmQKQ0nqU3Q1gGFl5IX/3jEqaXO+gpBkVu3nAGo6jnhLPjKSv9r/O7OjPqX5+TwJl Y50dvTA79k4ZxG5174fvhKCDzWlDy3OjvhPHg8UiiFy2emNYlZ9EIYUBYyBHw7kl+68s hkAfkoqDmbCPdk2OQeDXb+ysoClgJ2cf3czwbvGU6TXwcqnMyk21AO9jXgbjoOXK5fea tiOEwR4lWPag00Z0oyAeKhjKWlI3ASPk16zMtzmZy6SKr25zgpCfsgwDVq4KRb9whAOe txBOzdLesIW4YC3cSya0RgXh1dk4RhbUiJbtzH2WZGO5DoTDUXzn38jkNqC1hmgzOWHo kjXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9lvmalgZjlD9XOGqKFEMn/FI4YpAZndk01IZpWwPJqg=; b=nEi/WjBh3JZFjDbCWQcpxBAKiAn8ECREcpF2WjNokL64zlTZ7dSd91XiYtwrxivjXn WhpmOk/jJQGXbeYEen3f1/lHcxOzNlROJXdZIu7I+00xY0CsYZMAYRU8izGGQ5FmsdxF 1CT9MHrDyJ4S2/vo/mxHbXCN8BBOhbjO5n4EbIxZ7U7cl6p/QJfxuzV3gaqdsGMrcU4x IIPu0OU8jjLd+Nmdi8fc2+PImmSYY3Jt6Es0bS6cAzBw4s/e+axFrrJosmfAmWCmdIkt DHYy9CviwjECmJkjxUAKvVagSsPxRSRZZqNCT3hl6DRQrZEnW7V2fK4jRVQ5VARamtbD BHvA== X-Gm-Message-State: AOAM533eECeLZA5p8KGuDBTEOqMcd+iuG03TtLW5aV++q2elJ+KCfPF4 VMga4dBvKSj5jfJWP9iH+vNIt8rMUo7Ppw== X-Google-Smtp-Source: ABdhPJyEjNzbVb6cBv+5ul4FKPqpjcHhoYzqv6t9sp9CnkS/zbHaDZL5TeHPVqbETxhKBlwk1mEUvA== X-Received: by 2002:a17:902:778a:b0:13f:672c:103a with SMTP id o10-20020a170902778a00b0013f672c103amr12856421pll.55.1636763307182; Fri, 12 Nov 2021 16:28:27 -0800 (PST) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id z10sm7687748pfh.106.2021.11.12.16.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 16:28:26 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v4 0/5] cleanup more stuff on shutdown Date: Fri, 12 Nov 2021 16:28:19 -0800 Message-Id: <20211113002824.338343-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20200428235827.15383-1-stephen@networkplumber.org> References: <20200428235827.15383-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 should be no new exposed API or ABI changes here. 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)! v3 - fix a couple of minor checkpatch complaints v2 - rebase after 20.05 file renames - incorporate review comment feedback - hold off some of the more involved patches for later 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 ++++++++ 13 files changed, 96 insertions(+), 3 deletions(-) -- 2.30.2