From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64C52A00BE; Wed, 29 Apr 2020 01:14:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E6DCE1D635; Wed, 29 Apr 2020 01:14:26 +0200 (CEST) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id A88E21D62C for ; Wed, 29 Apr 2020 01:14:25 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id y25so132645pfn.5 for ; Tue, 28 Apr 2020 16:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3RkyjhvqfU7D6pecXAbbDM9lCkyc7UFrDRk9Krg1G1s=; b=j4dUnG7JO+v2eDpXGHBX4CobU+29Qc/Am5qOPzrN5FKNunWG3Cn3anCxafIo3EaVNw R/Vudp/xGj/myx6UAi6yVXnh9WwqkZUdBDRBwTYuxUDVo65PSiy344+ZEF0LJT9JC36a XJECAXLayyPZa1f/sJud8aMKhdFpx2SoQXLm504KbftPGBUghpc4FsEzboqMJPGa6JhL n2Yvbq11uub5n1eKLEvkZyndOTxtqJwyqDscFTrcD8J/tAJ2W6fYrmvG7n329DuXZ9B1 souK9CIauuIW4xe9h1SqaibHa1035q2d12BaaIhGqG0cBVkRNSmdfPQlen89ZmTso/Oe Gs2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3RkyjhvqfU7D6pecXAbbDM9lCkyc7UFrDRk9Krg1G1s=; b=p/MWOEkxsIKYoKzbnCcclX1s4Vx+ZNiwRXmrKmqp8pCxaN2gd/+/Inv7ZyhoVphm5r l1D65eI2CPvMhbt9ZJVvNvrrcLGsoi6u8raNM4oFTjA8eQTj186MWNWIAFDINa6bWTbZ EX94sD1qjg+MvuOMQ2zVvF3/+qVTUr03JawkXPL6xrbfQ5ynyXzDQN0Lf6u3pljp1MMi jYK6DgI3ecV4rUUbc4hgcF3dasc+pEjSIAzGy8RX7vhFUwyNEmt2xNjNUJ7lqJXA9pN0 B7zH6JfrN0lu2X2NuAtO61LSa7eb5sGA+GG+yTPunhXRHCkuQgAra3UtHnpTQ7W3bcgL lN4A== X-Gm-Message-State: AGi0PubGeRMdHfw38Nv67ZipG27T3kbSZCEumM3w3c9k4yovxy88HQ5d 9SnC9DmZrGAXppGhfc2Vn4Y9BSDhofbfcg== X-Google-Smtp-Source: APiQypIUHCtHjEKqcrCDPEOqGjhUVCCplc6dIIUqUk+ek5lp4SWp+NGHfJtHHiZ3V9IyWPHnDo4H4g== X-Received: by 2002:a62:9211:: with SMTP id o17mr5982688pfd.234.1588115663850; Tue, 28 Apr 2020 16:14:23 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id l64sm3230454pjb.44.2020.04.28.16.14.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 16:14:22 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 28 Apr 2020 16:14:07 -0700 Message-Id: <20200428231415.17985-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200104013341.19809-1-stephen@networkplumber.org> References: <20200104013341.19809-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 0/9] eal: cleanup resources on shutdown X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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(-) -- 2.20.1