From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 9729B5A8B for ; Mon, 23 May 2016 09:43:35 +0200 (CEST) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1b4kYa-0005FS-23; Mon, 23 May 2016 09:45:44 +0200 To: Thomas Monjalon , Panu Matilainen References: <1460629199-32489-1-git-send-email-olivier.matz@6wind.com> <36612895.rbhkJEDisP@xps13> <9d61a426-f580-b39e-1e38-7a30a4937324@redhat.com> <2024350.zjYMIZz45a@xps13> Cc: dev@dpdk.org From: Olivier Matz Message-ID: <5742B4A0.7030309@6wind.com> Date: Mon, 23 May 2016 09:43:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: <2024350.zjYMIZz45a@xps13> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 00/35] mempool: rework memory allocation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2016 07:43:35 -0000 Hi Panu, Thomas, On 05/20/2016 11:09 AM, Thomas Monjalon wrote: > 2016-05-20 11:42, Panu Matilainen: >> Just noticed this series "breaks" --no-huge as a regular user, commit >> 593a084afc2b to be exact: >> >> mmap(NULL, 4194304, PROT_READ|PROT_WRITE, >> MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, 0, 0) = -1 EAGAIN (Resource >> temporarily unavailable) >> write(1, "EAL: rte_eal_hugepage_init: mmap"..., 76EAL: >> rte_eal_hugepage_init: mmap() failed: Resource temporarily unavailable >> >> "Breaks" in quotes because I guess it always was broken (as the >> non-locked pages might not be in physical memory) and because its >> possible to adjust resourse limits to allow the operation to succeed. >> If you're root, that is. >> >> I was just looking into making the test-suite runnable by a regular user >> with no special privileges, > > I have the same dream, to make sure every developer can run the unit tests > easily and quickly. Thanks Panu for the feedback on this, I didn't notice this regression for a regular user. The goal of this commit was to do a step forward in the direction of a working --no-huge: locking the pages in physical memory is mandatory for most physical drivers. But as described at the end of http://dpdk.org/ml/archives/dev/2016-May/039229.html , the --no-huge option is still not working because the physical addresses are not correct. So I think it wouldn't be a problem to revert this commit if it breaks something. >> primarily to make it possible to run the >> testsuite as part of rpm package builds (in %check), and no special >> setup or extra privileges can be assumed there. Such tests are of course >> of limited coverage but still better than nothing, and --no-huge was my >> ticket there. Talk about bad timing :) >> >> It'd be fine to have limited subset of tests to run when non-privileged >> but since this one lives inside rte_eal_init() it practically prevents >> everything, unless I'm missing some other magic switch or such. Thoughts? > > This change was done for mbuf allocation because they are passed to the > hardware. We should not have any hardware constraint in the unit tests. > So I'd say it is a requirement for the memory rework. We must be capable > to allocate some locked pages if required, and some standard pages for > other usages. > Please jump in this thread: > http://dpdk.org/ml/archives/dev/2016-April/037444.html Yes, I agree, this is something that could be managed in the memory rework task. Olivier