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 BAE4DA00BE; Mon, 27 Apr 2020 14:12:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1195D1C128; Mon, 27 Apr 2020 14:12:36 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 3439B1C036 for ; Mon, 27 Apr 2020 14:12:34 +0200 (CEST) IronPort-SDR: gd7mJyLHaY/udHfbOdwcZ5sfFC2snw8/dyNmHfuv5rFhYl3iqOO7cUNVd6qrTXtoxkwnfrBb1Y 7yE76cG20LnQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2020 05:12:34 -0700 IronPort-SDR: vH5BK+59fnzoXj9dLfD7NhDhlvm4uFRtWOsVMeW6ma+aL4i6Tb0+iI29FkpSLGUHUe5rmEKwPB AKMF8+XSIa2A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,324,1583222400"; d="scan'208";a="275452083" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.211.137]) ([10.213.211.137]) by orsmga002.jf.intel.com with ESMTP; 27 Apr 2020 05:12:33 -0700 To: Stephen Hemminger , dev@dpdk.org References: <20200104013341.19809-1-stephen@networkplumber.org> <20200104013341.19809-10-stephen@networkplumber.org> From: "Burakov, Anatoly" Message-ID: <3a9e69b8-93ea-9631-67bd-4e5408ccdfac@intel.com> Date: Mon, 27 Apr 2020 13:12:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200104013341.19809-10-stephen@networkplumber.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 09/14] eal: close mem config on cleanup 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" On 04-Jan-20 1:33 AM, Stephen Hemminger wrote: > Resolves file descriptor left open after rte_eal_cleanup. > > Signed-off-by: Stephen Hemminger > --- > lib/librte_eal/linux/eal/eal.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c > index 9ad81378f23c..e5c2a24322e9 100644 > --- a/lib/librte_eal/linux/eal/eal.c > +++ b/lib/librte_eal/linux/eal/eal.c > @@ -1346,6 +1346,12 @@ rte_eal_cleanup(void) > rte_mp_channel_cleanup(); > eal_cleanup_config(&internal_config); > rte_eal_log_cleanup(); > + > + if (mem_cfg_fd != -1) { > + close(mem_cfg_fd); > + mem_cfg_fd = -1; > + } > + > return 0; > } > > For the patch, Acked-by: Anatoly Burakov However i think it's incomplete, as there are also memory-backing fbarrays that are still mapped. Also, secondary processes have their own shadow copies of the master page table located in the mem config, so those should be destroyed on cleanup too. -- Thanks, Anatoly