From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2018 05:27:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,347,1526367600"; d="scan'208";a="72070176" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.252.0.191]) ([10.252.0.191]) by fmsmga001.fm.intel.com with ESMTP; 13 Jul 2018 05:27:57 -0700 To: Thomas Monjalon 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 References: <2408769.8CpHiMRGOD@xps> From: "Burakov, Anatoly" Message-ID: <793f3d26-306e-209e-f866-a13abf1a9042@intel.com> Date: Fri, 13 Jul 2018 13:27:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <2408769.8CpHiMRGOD@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 7/9] eal: add --in-memory option 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: Fri, 13 Jul 2018 12:28:00 -0000 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