From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [dpdk-stable] [PATCH v2] app/procinfo: Fix memory leak by rte_service_init Date: Fri, 26 Jan 2018 18:26:54 +0100 Message-ID: <27105962.SPFB230vh8@xps> References: <1514735641-8738-1-git-send-email-vipin.varghese@intel.com> <1543040.UXSxQDX3pr@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: "Varghese, Vipin" , "stable@dpdk.org" , "dev@dpdk.org" , bruce.richardson@intel.com, konstantin.ananyev@intel.com, olivier.matz@6wind.com To: "Van Haaren, Harry" Return-path: In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 26/01/2018 18:15, Van Haaren, Harry: > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > 11/01/2018 20:47, Vipin Varghese: > > > When procinfo is run multiple times against primary application, it > > > consumes huge page memory by rte_service_init. Which is not released > > > at exit of application. > > > > > > Invoking rte_service_finalize to real memory and prevent memory leak. > > > > I don't think it is correct to call rte_service_finalize in applications, > > while rte_service_init is called in EAL. > > > > Maybe we need a new function in EAL. > > Yes correct - we need a rte_eal_deinit(), cleanup() or finalize() or something. This ties in with splitting EAL to be more modular on startup, and DPDK in general behaving more like a library and less like a single-monolith. > > For the 18.02 timeframe, the simplest solution to solve the secondary process mem-leak issue than to merge into these applications, unfortunately. > > The only other option I see is to add an rte_eal_finalize() function, and hide this call behind it, however it is quite late to add such a function, and what do we do with cases like rte_panic(), rte_exit(), or system signals like SIGINT, SIGHUP etc? It seems too complicated to add "quickly" to me. > > If there is technically a better solution viable in the given timeframe, I'm open to suggestions? I think it is better to keep the leak in 18.02, and takes time to fix it properly in 18.05. If you really think it is a major bug, we can try to expose a new EAL function now and refine it in 18.05. More opinions?