From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH] memory: do not use base-virtaddr in secondary processes Date: Tue, 19 Jun 2018 10:24:15 +0100 Message-ID: References: <1529351589-173939-1-git-send-email-dariuszx.stojaczyk@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: dev , "stable@dpdk.org" To: "Stojaczyk, DariuszX" , Alejandro Lucero Return-path: In-Reply-To: Content-Language: en-US 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 18-Jun-18 9:12 PM, Stojaczyk, DariuszX wrote: > > >> -----Original Message----- >> From: Alejandro Lucero [mailto:alejandro.lucero@netronome.com] >> Sent: Monday, June 18, 2018 9:33 PM >> >> On Mon, Jun 18, 2018 at 8:03 PM, Stojaczyk, DariuszX >> > >> wrote: >> >> Can you point me out to an NFP guide or some code that describes >> this in more detail? >> >> >> >> As I said, I'm working on a RFC. I will send something shortly. But I could give >> you an advance: the hugepages needs to be mapped below certain virtual >> address, 1TB, and I'm afraid that includes the primary and also the >> secondary processes. At least if any process can send or receive packets >> to/from a NFP. >> >> > > Thanks, I'm pretty sure we're safe, then. > >> >> If we're talking about base-virtaddr for hugepages, then that's always >> inherited from the primary process, regardless of what base-virtaddr is >> supplied to the secondary. >> >> >> >> >> But, is not your patch avoiding to use that base-virtaddr for secondary >> processes? > > I see now that the patch name is slightly misleading. Maybe I shouldn’t pick such a catchy title. Let me clarify: As of DPDK 18.05, --base-virtaddr param for secondary process applications only affects that shadow memseg metadata that's not useful for anyone, but can still do a lot of harm. Hugepage memory in secondary processes is always mapped to the same addresses the primary process uses. > > D. > Hi Alejandro, To solve this problem, one possible approach would be to have maximum VA address, and allocate memory downwards, rather than upwards. Is that by any chance approximate contents of your RFC? :) -- Thanks, Anatoly