From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yongseok Koh Subject: Re: [PATCH v6 51/70] mem: add support for mapping hugepages at runtime Date: Tue, 17 Apr 2018 02:06:28 +0000 Message-ID: <146A32F2-A70F-4595-B963-3930143CB127@mellanox.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , Bruce Richardson , "Wiles, Keith" , "jianfeng.tan@intel.com" , "andras.kovacs@ericsson.com" , "laszlo.vadkeri@ericsson.com" , "Walker, Benjamin" , Thomas Monjalon , Konstantin Ananyev , "kuralamudhan.ramakrishnan@intel.com" , "louise.m.daly@intel.com" , =?iso-8859-1?Q?N=E9lio_Laranjeiro?= , "pepperjo@japf.ch" , Jerin Jacob , Hemant Agrawal , Olivier Matz , Shreyansh Jain , "gowrishankar.m@linux.vnet.ibm.com" Return-path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30050.outbound.protection.outlook.com [40.107.3.50]) by dpdk.org (Postfix) with ESMTP id F3285D158 for ; Tue, 17 Apr 2018 04:06:31 +0200 (CEST) In-Reply-To: Content-Language: en-US Content-ID: <781F4EBBB2B0A24CA95CAAB9642F5EB0@eurprd05.prod.outlook.com> 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 Apr 11, 2018, at 5:30 AM, Anatoly Burakov = wrote: >=20 > Nothing uses this code yet. The bulk of it is copied from old > memory allocation code (linuxapp eal_memory.c). We provide an > EAL-internal API to allocate either one page or multiple pages, > guaranteeing that we'll get contiguous VA for all of the pages > that we requested. >=20 > Not supported on FreeBSD. >=20 > Locking is done via fcntl() because that way, when it comes to > taking out write locks or unlocking on deallocation, we don't > have to keep original fd's around. Plus, using fcntl() gives us > ability to lock parts of a file, which is useful for single-file > segments, which are coming down the line. >=20 > Signed-off-by: Anatoly Burakov > Tested-by: Santosh Shukla > Tested-by: Hemant Agrawal > Tested-by: Gowrishankar Muthukrishnan > --- [...] > diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/= linuxapp/eal/eal_memalloc.c > new file mode 100644 > index 0000000..45ea0ad > --- /dev/null > +++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c > @@ -0,0 +1,429 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2017-2018 Intel Corporation > + */ > + > +#define _FILE_OFFSET_BITS 64 > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include There's a bug in the old RedHat release: Bug 1476120 - glibc headers don't include linux/falloc.h, and therefore doe= sn't include fallocate() flags [1] How about adding "#include " ahead of fcntl.h? I'm quite l= azy to update my host and using CentOS 7.2.1511, then it failed to compile due = to this bug. [1] https://bugzilla.redhat.com/show_bug.cgi?id=3D1476120 Thanks, Yongseok=