From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v2 7/9] eal: add --in-memory option Date: Fri, 13 Jul 2018 13:27:56 +0100 Message-ID: <793f3d26-306e-209e-f866-a13abf1a9042@intel.com> References: <2408769.8CpHiMRGOD@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, ray.kinsella@intel.com, kuralamudhan.ramakrishnan@intel.com, louise.m.daly@intel.com, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com To: Thomas Monjalon Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 04752F94 for ; Fri, 13 Jul 2018 14:27:59 +0200 (CEST) In-Reply-To: <2408769.8CpHiMRGOD@xps> 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 13-Jul-18 1:13 PM, Thomas Monjalon wrote: > 13/07/2018 12:27, Anatoly Burakov: >> This command-line option will cause DPDK to operate entirely in >> memory and not create any shared files at runtime, including any >> shared configuration or hugetlbfs files. This is useful for debug >> purposes, as well as for certain use cases like containers or >> automatic memory cleanup. >> >> Currently, this option acts as a strict superset of --no-shconf and >> --huge-unlink commands. >> >> Signed-off-by: Anatoly Burakov > > I would like to see some support or review for this feature. > While the justification for it can be use-cases like running a DPDK process without worrying about cleaning up its hugepages afterwards (somewhat less of a concern since 18.05 but still a concern if primary crashes), it is really fixing the no-shconf/huge-unlink options to not be half-measures. Both of these options effectively disable secondary processes, but don't do it in a consistent way - huge-unlink cleans up hugepages after allocating them, but leaves shared config on. No-shconf disables shared config, but leaves hugepages in place. Since 18.05, huge-unlink didn't work anyway (wasn't implemented, which was my omission), and due to EAL now relying on fbarray's to store some data, no-shconf wasn't working correctly either because even though shared config wasn't created, two primaries still couldn't share a prefix with --no-shconf (see the first patch). So, this patchset is really an acknowledgement of the fact that both huge-unlink and no-shconf options are really there to disable secondary processes and stop leaving files on the file system. I just went one step further, and instead of allocating-and-then-removing hugepages we're not creating them in the first place, and map them anonymously instead. -- Thanks, Anatoly