From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LehEmuyLTBzcfb6D6+qQ859pE4SCDg7Ui9EvLfTWmls=; b=jGJztvUapsi67fbKFVDu9rTJdGwwbQU6JjH5E4Z4QmfNngY+n4fim/k6Z8/lqtLI210er6N+5hfQ/SAmqIwdLfb6nOimq67FxMIxb32cTI4o4bY0owT2lqAhUpjqDxEn4kg76tHshchGPaj/vccr1wtClkfcsqIJjskdd9xSMmA= Received: from VI1PR0501MB2045.eurprd05.prod.outlook.com (10.167.195.147) by VI1PR0501MB2509.eurprd05.prod.outlook.com (10.168.136.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.11; Tue, 17 Apr 2018 02:06:28 +0000 Received: from VI1PR0501MB2045.eurprd05.prod.outlook.com ([fe80::5453:e317:6563:11b3]) by VI1PR0501MB2045.eurprd05.prod.outlook.com ([fe80::5453:e317:6563:11b3%13]) with mapi id 15.20.0675.015; Tue, 17 Apr 2018 02:06:28 +0000 From: Yongseok Koh To: Anatoly Burakov 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" Thread-Topic: [PATCH v6 51/70] mem: add support for mapping hugepages at runtime Thread-Index: AQHT0ZD3FI/b5XIZb02VFzWquGBPVKQEPkCA Date: Tue, 17 Apr 2018 02:06:28 +0000 Message-ID: <146A32F2-A70F-4595-B963-3930143CB127@mellanox.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0501MB2509; 7:KYHM567urJc3YjI1aJdnQl4GTdvxO7jEFYOfj5CrUHUiZUG4TnN+O4mtQumflEq4biGgj6Yhd2zNNUaTKS+fBtoS9x3+PRMkDkIkh0AVr6mxBnraeWrQAlX1lIEwTC0oS/g2AncG6AN5IMeGaVWla6WYTrMpbSJnfgojTAC0qHMGny3DadMBY8gWzyntL3qtwaAF5Js5dCtBZCzqAg5Ak/xtgMmiaXCZVry11Fwc1LWZ8F44Tmd8Ap8AGYtdinKK x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2509; x-ms-traffictypediagnostic: VI1PR0501MB2509: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(83566789882024)(104084551191319)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231232)(944501327)(52105095)(6055026)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:VI1PR0501MB2509; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2509; x-forefront-prvs: 0645BEB7AA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(366004)(396003)(39380400002)(376002)(189003)(199004)(6512007)(14454004)(7736002)(76176011)(316002)(305945005)(4326008)(8936002)(7416002)(33656002)(81166006)(8656006)(6306002)(86362001)(2900100001)(966005)(5250100002)(3660700001)(6506007)(8676002)(6116002)(81156014)(97736004)(82746002)(53936002)(25786009)(3280700002)(66066001)(2906002)(446003)(83716003)(26005)(68736007)(476003)(102836004)(53546011)(2616005)(186003)(106356001)(6436002)(6916009)(5660300001)(6246003)(99286004)(11346002)(575784001)(3846002)(478600001)(229853002)(36756003)(6486002)(105586002)(54906003)(486006)(59450400001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2509; H:VI1PR0501MB2045.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: gux94JFvvSwN8HDhWUpWZR7LIvivUVVnUgrmJfnuRkh9qnjf+0LKk5KaaNrcJ0NqT0idnXUY6FcX3VaiequDhw/pqhS9dWrmdeDiqGoGPpMWWx62NbFlgZN0qQXqLP5tbuLwqYayI6m9n025bGGdCtoZ5msr449LCDwE7PwL+kudW/8pW1upSr/5Hbo43cRw spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: <781F4EBBB2B0A24CA95CAAB9642F5EB0@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 231ceb5f-6252-4500-07b6-08d5a407d4f7 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 231ceb5f-6252-4500-07b6-08d5a407d4f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2018 02:06:28.5916 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2509 Subject: Re: [dpdk-dev] [PATCH v6 51/70] mem: add support for mapping hugepages at runtime 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, 17 Apr 2018 02:06:32 -0000 > 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=