From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2D366378E; Tue, 19 Jun 2018 12:27:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2018 03:27:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,242,1526367600"; d="scan'208";a="65357552" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.252.26.59]) ([10.252.26.59]) by fmsmga001.fm.intel.com with ESMTP; 19 Jun 2018 03:27:35 -0700 To: Alejandro Lucero Cc: "Stojaczyk, DariuszX" , dev , "stable@dpdk.org" References: <1529351589-173939-1-git-send-email-dariuszx.stojaczyk@intel.com> From: "Burakov, Anatoly" Message-ID: <01d715f0-50aa-9d66-1cbb-1c5e4af0e3c6@intel.com> Date: Tue, 19 Jun 2018 11:27:34 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] memory: do not use base-virtaddr in secondary processes 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: , X-List-Received-Date: Tue, 19 Jun 2018 10:27:39 -0000 On 19-Jun-18 11:23 AM, Alejandro Lucero wrote: > > > On Tue, Jun 19, 2018 at 10:24 AM, Burakov, Anatoly > > wrote: > > 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? :) > > > Hi Anatoly, > > There's a lot of space below 1TB, but this specific upper limit is just > in the NFP case. My RFC will propose a generic solution assuming there > could be other devices in the future, and not just NIC devices, which > could have also some sort of limitation. OK, looking forward to it. > The problem is, those devices > limitations can not be known at memory initialization time, so some sort > of check is required afterwards, once the devices have been proved and > initialised. > Presumably, device driver would be in the best position to know things like that, no? Maybe a new device flag and an API to query such things from all devices? -- Thanks, Anatoly